aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ui/inccommand_spec.lua
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional/ui/inccommand_spec.lua')
-rw-r--r--test/functional/ui/inccommand_spec.lua20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/functional/ui/inccommand_spec.lua b/test/functional/ui/inccommand_spec.lua
index 74e85212c8..16c5477ee4 100644
--- a/test/functional/ui/inccommand_spec.lua
+++ b/test/functional/ui/inccommand_spec.lua
@@ -2750,6 +2750,26 @@ it(':substitute with inccommand, timer-induced :redraw #9777', function()
]])
end)
+it(":substitute doesn't crash with inccommand, if undo is empty #12932", function()
+ local screen = Screen.new(10,5)
+ clear()
+ command('set undolevels=-1')
+ common_setup(screen, 'split', 'test')
+ feed(':%s/test')
+ sleep(100)
+ feed('/')
+ sleep(100)
+ feed('f')
+ screen:expect([[
+ {12:f} |
+ {15:~ }|
+ {15:~ }|
+ {15:~ }|
+ :%s/test/f^ |
+ ]])
+ assert_alive()
+end)
+
it('long :%s/ with inccommand does not collapse cmdline', function()
local screen = Screen.new(10,5)
clear()