1
0
forked from aniani/vim

patch 9.1.1331: Leaking memory with cmdcomplete()

Problem:  Leaking memory with cmdcomplete()
          (zeertzjq, after v9.1.1329)
Solution: free the memory (Girish Palya)

closes: #17190

Signed-off-by: Girish Palya <girishji@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Girish Palya
2025-04-22 19:52:16 +02:00
committed by Christian Brabandt
parent fa3b1043c6
commit 5c3d1e3258
5 changed files with 14 additions and 4 deletions

View File

@@ -2038,6 +2038,12 @@ func Test_Cmdline_Trigger()
call assert_equal('', g:log)
call feedkeys(":echo hello", "tx")
call assert_equal('CmdlineLeavePre', g:log)
let g:count = 0
autocmd CmdlineLeavePre * let g:count += 1
call feedkeys(":let c = input('? ')\<cr>B\<cr>", "tx")
call assert_equal(2, g:count)
unlet! g:count
unlet! g:log
bw!
endfunc