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)
diff --git a/src/popupwin.c b/src/popupwin.c
index e6792c8..27e9fe1 100644
--- a/src/popupwin.c
+++ b/src/popupwin.c
@@ -1414,7 +1414,7 @@
}
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);