fix(inccommand): parse the command to check if it is previewable

Free regprog if command isn't previewable

Co-authored-by: zeertzjq <zeertzjq@outlook.com>
This commit is contained in:
Famiu Haque
2022-06-28 11:00:05 +06:00
committed by GitHub
parent 274609a109
commit 7e1cf6b764
4 changed files with 34 additions and 50 deletions

View File

@@ -3008,3 +3008,16 @@ it('long :%s/ with inccommand does not collapse cmdline', function()
AAAAAAA^ |
]])
end)
it("with 'inccommand' typing :filter doesn't segfault or leak memory #19057", function()
clear()
common_setup(nil, 'nosplit')
feed(':filter s')
assert_alive()
feed(' ')
assert_alive()
feed('h')
assert_alive()
feed('i')
assert_alive()
end)