From 7e1cf6b7642f0ab14656d853d44f4409b2987b9c Mon Sep 17 00:00:00 2001 From: Famiu Haque Date: Tue, 28 Jun 2022 11:00:05 +0600 Subject: fix(inccommand): parse the command to check if it is previewable Free regprog if command isn't previewable Co-authored-by: zeertzjq --- test/functional/ui/inccommand_spec.lua | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'test') diff --git a/test/functional/ui/inccommand_spec.lua b/test/functional/ui/inccommand_spec.lua index 7a42e72732..4286446af7 100644 --- a/test/functional/ui/inccommand_spec.lua +++ b/test/functional/ui/inccommand_spec.lua @@ -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) -- cgit