summaryrefslogtreecommitdiffstats
path: root/src/popupwin.c
diff options
context:
space:
mode:
authorLemonBoy <thatlemon@gmail.com>2022-04-20 19:47:37 +0100
committerBram Moolenaar <Bram@vim.org>2022-04-20 19:47:37 +0100
commit0044e5100a0e76a0bc1ea18c63a432c20428de5e (patch)
treee3ad4e3fdeb6ec2997ec5b061b72410abefaa697 /src/popupwin.c
parentdbec26d7893dca4ff38fa4b96ac91203d30ccae5 (diff)
patch 8.2.4799: popup does not use correct toplinev8.2.4799
Problem: Popup does not use correct topline. Solution: Also add one when firstline is negative. (closes #10229)
Diffstat (limited to 'src/popupwin.c')
-rw-r--r--src/popupwin.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/popupwin.c b/src/popupwin.c
index e6792c8528..27e9fe12e6 100644
--- a/src/popupwin.c
+++ b/src/popupwin.c
@@ -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);