mirror of
https://github.com/vim/vim.git
synced 2025-10-24 08:54:47 -04:00
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: #18228
closes: #18229
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
1ed2ff77d8
commit
c7f235bd43
10
src/testdir/dumps/Test_wildmenu_pum_65.dump
Normal file
10
src/testdir/dumps/Test_wildmenu_pum_65.dump
Normal file
@@ -0,0 +1,10 @@
|
||||
| +0&#ffffff0@74
|
||||
|~+0#4040ff13&| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @3| +0#0000001#ffd7ff255|u|n|d|e|f|i|n|e| @6| +0#4040ff13#ffffff0@53
|
||||
|~| @3| +0#0000001#ffd7ff255|u|n|p|l|a|c|e| @7| +0#4040ff13#ffffff0@53
|
||||
|:+0#0000000&|s|i|g|n| |u|n> @66
|
||||
@@ -2973,6 +2973,23 @@ func Test_wildmenu_pum()
|
||||
call term_sendkeys(buf, ":cn\<Tab>")
|
||||
call VerifyScreenDump(buf, 'Test_wildmenu_pum_64', {})
|
||||
|
||||
" If "longest" finds no candidate in "longest,full", "full" is used
|
||||
call term_sendkeys(buf, "\<Esc>:set wildmode=longest,full\<CR>")
|
||||
call term_sendkeys(buf, ":set wildoptions=pum\<CR>")
|
||||
call term_sendkeys(buf, ":sign un\<Tab>")
|
||||
call VerifyScreenDump(buf, 'Test_wildmenu_pum_09', {})
|
||||
call term_sendkeys(buf, "\<Tab>")
|
||||
call VerifyScreenDump(buf, 'Test_wildmenu_pum_10', {})
|
||||
|
||||
" Similarly for "longest,noselect:full"
|
||||
call term_sendkeys(buf, "\<Esc>:set wildmode=longest,noselect:full\<CR>")
|
||||
call term_sendkeys(buf, ":sign un\<Tab>")
|
||||
call VerifyScreenDump(buf, 'Test_wildmenu_pum_65', {})
|
||||
call term_sendkeys(buf, "\<Tab>")
|
||||
call VerifyScreenDump(buf, 'Test_wildmenu_pum_09', {})
|
||||
call term_sendkeys(buf, "\<Tab>")
|
||||
call VerifyScreenDump(buf, 'Test_wildmenu_pum_10', {})
|
||||
|
||||
call term_sendkeys(buf, "\<C-U>\<Esc>")
|
||||
call StopVimInTerminal(buf)
|
||||
endfunc
|
||||
|
||||
Reference in New Issue
Block a user