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>
(cherry picked from commit 4d22424d9e)
This commit is contained in:
zeertzjq
2022-12-08 20:11:39 +08:00
committed by github-actions[bot]
parent 0bc56cebe7
commit 21ea794690
3 changed files with 43 additions and 0 deletions

View File

@@ -2417,6 +2417,29 @@ describe('builtin popupmenu', function()
]]}
end)
-- oldtest: Test_wildmenu_pum_clear_entries()
it('wildoptions=pum when using Ctrl-E as wildchar vim-patch:9.0.1030', function()
screen:try_resize(30, 10)
exec([[
set wildoptions=pum
set wildchar=<C-E>
]])
feed(':sign <C-E><C-E>')
screen:expect([[
|
{1:~ }|
{1:~ }|
{1:~ }{s: define }{1: }|
{1:~ }{n: jump }{1: }|
{1:~ }{n: list }{1: }|
{1:~ }{n: place }{1: }|
{1:~ }{n: undefine }{1: }|
{1:~ }{n: unplace }{1: }|
:sign define^ |
]])
assert_alive()
end)
it("'pumblend' RGB-color", function()
screen:try_resize(60,14)
screen:set_default_attr_ids({