aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-07-17 10:15:45 +0800
committerGitHub <noreply@github.com>2023-07-17 10:15:45 +0800
commitb60a2ab4cb7bb7d86dcda1dfe2396a9eda384e35 (patch)
treefd84f00d239eb9f8227e359b898081465dccfdd7 /test
parentf660b794808ac809ee8cafe82ddd824840bc8e2c (diff)
downloadrneovim-b60a2ab4cb7bb7d86dcda1dfe2396a9eda384e35.tar.gz
rneovim-b60a2ab4cb7bb7d86dcda1dfe2396a9eda384e35.tar.bz2
rneovim-b60a2ab4cb7bb7d86dcda1dfe2396a9eda384e35.zip
fix(inccommand): block errors when parsing command line again (#24374)
Revert the change to ex_getln.c from a741c7fd0465c949a0016fcbee5f4526b65f8c02
Diffstat (limited to 'test')
-rw-r--r--test/functional/ui/inccommand_spec.lua18
1 files changed, 16 insertions, 2 deletions
diff --git a/test/functional/ui/inccommand_spec.lua b/test/functional/ui/inccommand_spec.lua
index 23b200bd24..dc4aeb9c83 100644
--- a/test/functional/ui/inccommand_spec.lua
+++ b/test/functional/ui/inccommand_spec.lua
@@ -3086,8 +3086,7 @@ end)
it('long :%s/ with inccommand does not collapse cmdline', function()
clear()
local screen = Screen.new(10,5)
- common_setup(screen)
- command('set inccommand=nosplit')
+ common_setup(screen, 'nosplit')
feed(':%s/AAAAAAA', 'A', 'A', 'A', 'A', 'A', 'A', 'A', 'A', 'A', 'A', 'A',
'A', 'A', 'A', 'A', 'A', 'A', 'A', 'A', 'A')
screen:expect([[
@@ -3099,6 +3098,21 @@ it('long :%s/ with inccommand does not collapse cmdline', function()
]])
end)
+it("with 'inccommand' typing invalid `={expr}` does not show error", function()
+ clear()
+ local screen = Screen.new(30, 6)
+ common_setup(screen, 'nosplit')
+ feed(':edit `=`')
+ screen:expect([[
+ |
+ {15:~ }|
+ {15:~ }|
+ {15:~ }|
+ {15:~ }|
+ :edit `=`^ |
+ ]])
+end)
+
it("with 'inccommand' typing :filter doesn't segfault or leak memory #19057", function()
clear()
common_setup(nil, 'nosplit')