1
0
forked from aniani/vim

patch 9.0.1729: screenpos() wrong when w_skipcol and cpoptions+=n

Problem:    screenpos() wrong result with w_skipcol and cpoptions+=n
Solution:   Use adjust_plines_for_skipcol() instead of subtracting
            w_skipcol.

closes: #12625

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
This commit is contained in:
zeertzjq
2023-08-17 22:58:53 +02:00
committed by Christian Brabandt
parent 825cf813fa
commit bfe377b8f2
7 changed files with 87 additions and 46 deletions

View File

@@ -654,7 +654,7 @@ popup_show_curline(win_T *wp)
wp->w_topline = wp->w_buffer->b_ml.ml_line_count;
while (wp->w_topline < wp->w_cursor.lnum
&& wp->w_topline < wp->w_buffer->b_ml.ml_line_count
&& plines_m_win(wp, wp->w_topline, wp->w_cursor.lnum)
&& plines_m_win(wp, wp->w_topline, wp->w_cursor.lnum, TRUE)
> wp->w_height)
++wp->w_topline;
}