1
0
forked from aniani/vim

patch 9.0.1600: screenpos() does not take w_skipcol into account

Problem:    screenpos() does not take w_skipcol into account.
Solution:   Subtract w_skipcol from column. (closes #12486, closes #12476)
This commit is contained in:
zeertzjq
2023-06-03 17:11:47 +01:00
committed by Bram Moolenaar
parent a109f39ef5
commit f0e68c0e2a
3 changed files with 39 additions and 1 deletions

View File

@@ -1479,6 +1479,9 @@ textpos2screenpos(
col += off;
width = wp->w_width - off + win_col_off2(wp);
if (pos->lnum == wp->w_topline)
col -= wp->w_skipcol;
// long line wrapping, adjust row
if (wp->w_p_wrap
&& col >= (colnr_T)wp->w_width