patch 9.1.1147: preview-window does not scroll correctly
Problem: preview-window does not scroll correctly
Solution: init firstline = 0 for a preview window
(Girish Palya)
The 'info' window, which appears during insert-mode completion to display
additional information, was not scrolling properly when using commands like:
win_execute(popup_findinfo(), "normal! \<PageDown>")
This issue made it impossible to navigate through info window contents using
keyboard-based scrolling.
The fix correctly updates the w_firstline value of the popup window, ensuring
proper scrolling behavior. Mouse scrolling was already working as expected and
remains unaffected.
closes: #16703
Signed-off-by: Girish Palya <girishji@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/src/popupmenu.c b/src/popupmenu.c
index d9ab997..44235ef 100644
--- a/src/popupmenu.c
+++ b/src/popupmenu.c
@@ -1097,7 +1097,7 @@
if (pum_selected != prev_selected)
{
# ifdef FEAT_PROP_POPUP
- curwin->w_firstline = 1;
+ curwin->w_firstline = 0;
# endif
curwin->w_topline = 1;
}