diff options
Diffstat (limited to 'src/charset.c')
-rw-r--r-- | src/charset.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/charset.c b/src/charset.c index eb8baa946..984d7653e 100644 --- a/src/charset.c +++ b/src/charset.c @@ -1296,6 +1296,10 @@ getvcol( posptr = NULL; /* continue until the NUL */ else { + /* Special check for an empty line, which can happen on exit, when + * ml_get_buf() always returns an empty string. */ + if (*ptr == NUL) + pos->col = 0; posptr = ptr + pos->col; #ifdef FEAT_MBYTE if (has_mbyte) |