1
0
forked from aniani/vim

patch 8.2.4799: popup does not use correct topline

Problem:    Popup does not use correct topline.
Solution:   Also add one when firstline is negative. (closes #10229)
This commit is contained in:
LemonBoy
2022-04-20 19:47:37 +01:00
committed by Bram Moolenaar
parent dbec26d789
commit 0044e5100a
3 changed files with 16 additions and 1 deletions

View File

@@ -1414,7 +1414,7 @@ popup_adjust_position(win_T *wp)
}
if (wp->w_firstline < 0)
wp->w_topline = lnum > 0 ? lnum + 1 : lnum;
wp->w_topline = lnum + 1;
wp->w_has_scrollbar = wp->w_want_scrollbar
&& (wp->w_topline > 1 || lnum <= wp->w_buffer->b_ml.ml_line_count);