vim-patch:8.0.0250

Problem:    When virtcol() gets a column that is not the first byte of a
            multi-byte character the result is unpredictable. (Christian
            Ludwig)
Solution:   Correct the column to the first byte of a multi-byte character.
            Change the utf-8 test to new style.

0c0590d982

Closes #6269
This commit is contained in:
James McCoy
2017-03-24 09:36:09 -04:00
parent 38274051c0
commit 2a6d44ca52
3 changed files with 67 additions and 0 deletions

View File

@@ -1166,6 +1166,7 @@ void getvcol(win_T *wp, pos_T *pos, colnr_T *start, colnr_T *cursor,
pos->col = 0;
}
posptr = ptr + pos->col;
posptr -= utf_head_off(line, posptr);
}
// This function is used very often, do some speed optimizations.