0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

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 #5133)
This commit is contained in:
Bram Moolenaar
2019-10-27 21:39:09 +01:00
parent 1c329c04be
commit 38ba4dce4a
3 changed files with 18 additions and 1 deletions

View File

@@ -1217,7 +1217,7 @@ textpos2screenpos(
col -= rowoff * width;
}
col -= wp->w_leftcol;
if (col >= width)
if (col >= wp->w_width)
col = -1;
if (col >= 0)
coloff = col - scol + wp->w_wincol + 1;