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>
diff --git a/src/popupwin.c b/src/popupwin.c
index 4f72d07..92195a2 100644
--- a/src/popupwin.c
+++ b/src/popupwin.c
@@ -654,7 +654,7 @@
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;
}