0
0
mirror of https://github.com/vim/vim.git synced 2025-09-29 04:34:16 -04:00

patch 8.2.4325: 'wildmenu' only shows few matches

Problem:    'wildmenu' only shows few matches.
Solution:   Add the "pum" option: use a popup menu to show the matches.
            (Yegappan Lakshmanan et al., closes #9707)
This commit is contained in:
Yegappan Lakshmanan
2022-02-08 12:08:07 +00:00
committed by Bram Moolenaar
parent 3787f26c2e
commit 3908ef5017
41 changed files with 673 additions and 17 deletions

View File

@@ -116,7 +116,10 @@ pum_display(
// Remember the essential parts of the window position and size, so we
// can decide when to reposition the popup menu.
pum_window = curwin;
pum_win_row = curwin->w_wrow + W_WINROW(curwin);
if (State == CMDLINE)
pum_win_row = cmdline_row;
else
pum_win_row = curwin->w_wrow + W_WINROW(curwin);
pum_win_height = curwin->w_height;
pum_win_col = curwin->w_wincol;
pum_win_wcol = curwin->w_wcol;
@@ -215,6 +218,11 @@ pum_display(
max_width = pum_base_width;
// Calculate column
#ifdef FEAT_WILDMENU
if (State == CMDLINE)
cursor_col = cmdline_compl_startcol();
else
#endif
#ifdef FEAT_RIGHTLEFT
if (curwin->w_p_rl)
cursor_col = curwin->w_wincol + curwin->w_width