aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2019-03-25 03:27:24 +0100
committerJustin M. Keyes <justinkz@gmail.com>2019-04-14 02:22:19 +0200
commitdd9554a8205c18ab4194d21445bb1fe6c960229f (patch)
treef45ffc483e7359594d6e187d91433ab4cb38f407 /test
parent2c34a10aa25b38a8cf3b0c21a668b184883b4cff (diff)
downloadrneovim-dd9554a8205c18ab4194d21445bb1fe6c960229f.tar.gz
rneovim-dd9554a8205c18ab4194d21445bb1fe6c960229f.tar.bz2
rneovim-dd9554a8205c18ab4194d21445bb1fe6c960229f.zip
inccommand: Ignore :redraw during preview
closes #9777
Diffstat (limited to 'test')
-rw-r--r--test/functional/ui/inccommand_spec.lua27
1 files changed, 27 insertions, 0 deletions
diff --git a/test/functional/ui/inccommand_spec.lua b/test/functional/ui/inccommand_spec.lua
index c215ece2f2..4f243e6413 100644
--- a/test/functional/ui/inccommand_spec.lua
+++ b/test/functional/ui/inccommand_spec.lua
@@ -2607,3 +2607,30 @@ it(':substitute with inccommand during :terminal activity', function()
end)
end)
+
+it(':substitute with inccommand, timer-induced :redraw #9777', function()
+ local screen = Screen.new(30,12)
+ clear()
+ command('set cmdwinheight=3')
+ command('call timer_start(10, {-> execute("redraw")}, {"repeat":-1})')
+ command('call timer_start(10, {-> execute("redrawstatus")}, {"repeat":-1})')
+ common_setup(screen, 'split', 'foo bar baz\nbar baz fox\nbar foo baz')
+
+ feed('gg')
+ feed(':%s/foo/ZZZ')
+ sleep(20) -- Allow some timer activity.
+ screen:expect([[
+ {12:ZZZ} bar baz |
+ bar baz fox |
+ bar {12:ZZZ} baz |
+ {15:~ }|
+ {15:~ }|
+ {15:~ }|
+ {11:[No Name] [+] }|
+ |1| {12:ZZZ} bar baz |
+ |3| bar {12:ZZZ} baz |
+ {15:~ }|
+ {10:[Preview] }|
+ :%s/foo/ZZZ^ |
+ ]])
+end)