1
0
forked from aniani/vim

patch 8.1.2250: CTRL-U and CTRL-D don't work in popup window

Problem:    CTRL-U and CTRL-D don't work in popup window.
Solution:   Initialize 'scroll'.  Add "lastline" in popup_getpos().
            (closes #5170)
This commit is contained in:
Bram Moolenaar
2019-11-03 22:29:38 +01:00
parent d047840ce4
commit 30efcf3d26
4 changed files with 28 additions and 1 deletions

View File

@@ -1373,6 +1373,8 @@ popup_adjust_position(win_T *wp)
wp->w_height = wp->w_maxheight;
if (wp->w_height > Rows - wp->w_winrow)
wp->w_height = Rows - wp->w_winrow;
if (wp->w_height != org_height)
win_comp_scroll(wp);
if (center_vert)
{
@@ -2500,6 +2502,7 @@ f_popup_getpos(typval_T *argvars, typval_T *rettv)
dict_add_number(dict, "scrollbar", wp->w_has_scrollbar);
dict_add_number(dict, "firstline", wp->w_topline);
dict_add_number(dict, "lastline", wp->w_botline - 1);
dict_add_number(dict, "visible",
win_valid(wp) && (wp->w_popup_flags & POPF_HIDDEN) == 0);