Mercurial > vim
comparison src/popupwin.c @ 35073:80240c27c4ff v9.1.0380
patch 9.1.0380: Calculating line height for unnecessary amount of lines
Commit: https://github.com/vim/vim/commit/32d701f51b1ed2834071a2c5031a300936beda13
Author: Luuk van Baal <luukvbaal@gmail.com>
Date: Sun Apr 28 16:24:02 2024 +0200
patch 9.1.0380: Calculating line height for unnecessary amount of lines
Problem: Calculating line height for unnecessary amount of lines with
half-page scrolling (zhscn, after 9.1.0280)
Solution: Replace "limit_winheight" argument with higher resolution
"max" argument to which to limit the calculated line height
in plines_m_win() to (Luuk van Baal)
fixes: #14650
closes: #14652
Signed-off-by: Luuk van Baal <luukvbaal@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sun, 28 Apr 2024 16:30:12 +0200 |
parents | a93a9b349a5e |
children | 5301104f466a |
comparison
equal
deleted
inserted
replaced
35072:8de906dadd4a | 35073:80240c27c4ff |
---|---|
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, FALSE) | 657 && plines_m_win(wp, wp->w_topline, wp->w_cursor.lnum, |
658 > wp->w_height) | 658 wp->w_height + 1) > 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. |
663 if (wp->w_firstline > 0) | 663 if (wp->w_firstline > 0) |