aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ui/inccommand_spec.lua
diff options
context:
space:
mode:
authorFamiu Haque <famiuhaque@protonmail.com>2022-06-28 11:00:05 +0600
committerGitHub <noreply@github.com>2022-06-28 13:00:05 +0800
commit7e1cf6b7642f0ab14656d853d44f4409b2987b9c (patch)
treec3f05b626f2d3e57da42f2d19dc713096246ec1f /test/functional/ui/inccommand_spec.lua
parent274609a109fe7d4a72107e45fd1f13c2066a3663 (diff)
downloadrneovim-7e1cf6b7642f0ab14656d853d44f4409b2987b9c.tar.gz
rneovim-7e1cf6b7642f0ab14656d853d44f4409b2987b9c.tar.bz2
rneovim-7e1cf6b7642f0ab14656d853d44f4409b2987b9c.zip
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>
Diffstat (limited to 'test/functional/ui/inccommand_spec.lua')
-rw-r--r--test/functional/ui/inccommand_spec.lua13
1 files changed, 13 insertions, 0 deletions
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)