0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 8.1.1622: wrong width if displaying a lot of lines in a popup window

Problem:    Wrong width if displaying a lot of lines in a popup window.
Solution:   Accurately compute the line overflow.
This commit is contained in:
Bram Moolenaar
2019-07-03 23:20:18 +02:00
parent 80edda1cf5
commit e296e3177b
4 changed files with 21 additions and 6 deletions

View File

@@ -855,8 +855,8 @@ popup_adjust_position(win_T *wp)
if (wp->w_width < len)
wp->w_width = len;
// do not use the width of lines we're not going to show
if (wp->w_maxheight > 0 && wp->w_buffer->b_ml.ml_line_count
- wp->w_topline + 1 + wrapped > wp->w_maxheight)
if (wp->w_maxheight > 0
&& lnum - wp->w_topline + 1 + wrapped > wp->w_maxheight)
break;
}