comparison src/popupwin.c @ 32832:0503955dcd34 v9.0.1729

patch 9.0.1729: screenpos() wrong when w_skipcol and cpoptions+=n Commit: https://github.com/vim/vim/commit/bfe377b8f2d080e5f85c8cbecf3533456e1d6312 Author: zeertzjq <zeertzjq@outlook.com> Date: Thu Aug 17 22:58:53 2023 +0200 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>
author Christian Brabandt <cb@256bit.org>
date Thu, 17 Aug 2023 23:15:02 +0200
parents abf161ce0c77
children 29b2193466e0
comparison
equal deleted inserted replaced
32831:6b08d6935217 32832:0503955dcd34
652 wp->w_topline = 1; 652 wp->w_topline = 1;
653 else if (wp->w_topline > wp->w_buffer->b_ml.ml_line_count) 653 else if (wp->w_topline > wp->w_buffer->b_ml.ml_line_count)
654 wp->w_topline = wp->w_buffer->b_ml.ml_line_count; 654 wp->w_topline = wp->w_buffer->b_ml.ml_line_count;
655 while (wp->w_topline < wp->w_cursor.lnum 655 while (wp->w_topline < wp->w_cursor.lnum
656 && wp->w_topline < wp->w_buffer->b_ml.ml_line_count 656 && wp->w_topline < wp->w_buffer->b_ml.ml_line_count
657 && plines_m_win(wp, wp->w_topline, wp->w_cursor.lnum) 657 && plines_m_win(wp, wp->w_topline, wp->w_cursor.lnum, TRUE)
658 > wp->w_height) 658 > wp->w_height)
659 ++wp->w_topline; 659 ++wp->w_topline;
660 } 660 }
661 661
662 // Don't let "firstline" cause a scroll. 662 // Don't let "firstline" cause a scroll.