mirror of
https://github.com/neovim/neovim.git
synced 2025-10-16 23:06:14 +00:00
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:
@@ -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.
|
||||
|
Reference in New Issue
Block a user