vim-patch:8.2.4325: 'wildmenu' only shows few matches (#19876)

Problem:    'wildmenu' only shows few matches.
Solution:   Add the "pum" option: use a popup menu to show the matches.
            (Yegappan Lakshmanan et al., closes vim/vim#9707)
3908ef5017

Omit p_wmnu check in cmdline_pum_active() as it can cause problems.
Omit vim_strchr() flags as that isn't really better than bitmasks.
Omit key translations and document it in vim_diff.txt.
This commit is contained in:
zeertzjq
2022-08-21 21:31:25 +08:00
committed by GitHub
parent dde90f0ca4
commit e3eb6967bc
12 changed files with 520 additions and 17 deletions

View File

@@ -258,7 +258,7 @@ void cmdline_pum_display(bool changed_array)
bool cmdline_pum_active(void)
{
// return p_wmnu && pum_visible() && compl_match_array != NULL;
// compl_match_array != NULL should already imply pum_visible() in Nvim.
return compl_match_array != NULL;
}
@@ -269,6 +269,12 @@ void cmdline_pum_remove(void)
XFREE_CLEAR(compl_match_array);
}
void cmdline_pum_cleanup(CmdlineInfo *cclp)
{
cmdline_pum_remove();
wildmenu_cleanup(cclp);
}
/// Do wildcard expansion on the string 'str'.
/// Chars that should not be expanded must be preceded with a backslash.
/// Return a pointer to allocated memory containing the new string.