mirror of
https://github.com/neovim/neovim.git
synced 2025-09-18 01:08:20 +00:00
vim-patch:9.0.1030: using freed memory with the cmdline popup menu
Problem: Using freed memory with the cmdline popup menu.
Solution: Clear the popup menu when clearing the matches. (closes vim/vim#11677)
038e6d20e6
Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
@@ -745,6 +745,11 @@ char *ExpandOne(expand_T *xp, char *str, char *orig, int options, int mode)
|
||||
FreeWild(xp->xp_numfiles, xp->xp_files);
|
||||
xp->xp_numfiles = -1;
|
||||
XFREE_CLEAR(orig_save);
|
||||
|
||||
// The entries from xp_files may be used in the PUM, remove it.
|
||||
if (compl_match_array != NULL) {
|
||||
cmdline_pum_remove();
|
||||
}
|
||||
}
|
||||
findex = 0;
|
||||
|
||||
|
Reference in New Issue
Block a user