diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-08-21 21:31:25 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-21 21:31:25 +0800 |
commit | e3eb6967bcce6a7f82639aa9d2e925080804026d (patch) | |
tree | 587cf43476ffb1d40f79e46101d8ce12552730f6 /src/nvim/cmdexpand.c | |
parent | dde90f0ca4e394667afe39c18f4a4dabdd8a6666 (diff) | |
download | rneovim-e3eb6967bcce6a7f82639aa9d2e925080804026d.tar.gz rneovim-e3eb6967bcce6a7f82639aa9d2e925080804026d.tar.bz2 rneovim-e3eb6967bcce6a7f82639aa9d2e925080804026d.zip |
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)
https://github.com/vim/vim/commit/3908ef5017a6b4425727013588f72cc7343199b9
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.
Diffstat (limited to 'src/nvim/cmdexpand.c')
-rw-r--r-- | src/nvim/cmdexpand.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/nvim/cmdexpand.c b/src/nvim/cmdexpand.c index 56fc39c83d..e82e98ba4e 100644 --- a/src/nvim/cmdexpand.c +++ b/src/nvim/cmdexpand.c @@ -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. |