mirror of
https://github.com/neovim/neovim.git
synced 2025-11-22 10:06:33 +00:00
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:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user