mirror of
https://github.com/neovim/neovim.git
synced 2025-09-27 05:28:33 +00:00
vim-patch:9.1.1740: Memory leak with wildmode=longest,full and wildoptions=pum
Problem: Memory leak with wildmode=longest,full and wildoptions=pum
(after 9.1.1737).
Solution: Avoid using showmatches() and WILD_NEXT together. Also fix
wildmode=longest,noselect:full selecting wrong item
(zeertzjq).
fixes: vim/vim#18228
closes: vim/vim#18229
c7f235bd43
This commit is contained in:
@@ -1188,13 +1188,11 @@ static int command_line_wildchar_complete(CommandLineState *s)
|
||||
bool wim_full_next = (wim_flags[1] & kOptWimFlagFull);
|
||||
bool wim_noselect_next = (wim_flags[1] & kOptWimFlagNoselect);
|
||||
if (wim_list_next || (p_wmnu && (wim_full_next || wim_noselect_next))) {
|
||||
if (wim_noselect_next) {
|
||||
options |= WILD_NOSELECT;
|
||||
}
|
||||
if (wim_full_next || wim_noselect_next) {
|
||||
if (wim_full_next && !wim_noselect_next) {
|
||||
nextwild(&s->xpc, WILD_NEXT, options, escape);
|
||||
} else {
|
||||
showmatches(&s->xpc, p_wmnu, wim_list_next, wim_noselect_next);
|
||||
}
|
||||
showmatches(&s->xpc, p_wmnu, wim_list_next, wim_noselect_next);
|
||||
if (wim_list_next) {
|
||||
s->did_wild_list = true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user