mirror of
https://github.com/neovim/neovim.git
synced 2025-10-17 23:31:51 +00:00
vim-patch:8.1.2228: screenpos() returns wrong values when 'number' is set
Problem: screenpos() returns wrong values when 'number' is set. (Ben
Jackson)
Solution: Compare the column with the window width. (closes vim/vim#5133)
38ba4dce4a
This commit is contained in:
@@ -996,7 +996,7 @@ void textpos2screenpos(win_T *wp, pos_T *pos, int *rowp, int *scolp,
|
||||
|
||||
col -= wp->w_leftcol;
|
||||
|
||||
if (col >= 0 && col < width) {
|
||||
if (col >= 0 && col < wp->w_width) {
|
||||
coloff = col - scol + (local ? 0 : wp->w_wincol) + 1;
|
||||
} else {
|
||||
scol = ccol = ecol = 0;
|
||||
|
Reference in New Issue
Block a user