aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ui
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2021-09-20 08:42:18 -0700
committerGitHub <noreply@github.com>2021-09-20 08:42:18 -0700
commitf8e0011534a3f94cfd341fd9bfce1bcf9b1b7b73 (patch)
treecb57bbedc1537f7f47e1768c8ab8b9e6a527381c /test/functional/ui
parent7d67bd58655052103f3891122f0e6fe30ae1f829 (diff)
downloadrneovim-f8e0011534a3f94cfd341fd9bfce1bcf9b1b7b73.tar.gz
rneovim-f8e0011534a3f94cfd341fd9bfce1bcf9b1b7b73.tar.bz2
rneovim-f8e0011534a3f94cfd341fd9bfce1bcf9b1b7b73.zip
fix(inccommand): ignore trailing commands only for *previewed* command #15732
Since the `State` is global, other scripts are unexpectedly affected during the 'inccommand' preview. This commit introduces a new flag for `do_cmdline`, in order to ignore trailing '|'-separated commands only for the command invoking the preview. fix #8796, update #7494 Co-authored-by: itchyny <itchyny@hatena.ne.jp>
Diffstat (limited to 'test/functional/ui')
-rw-r--r--test/functional/ui/inccommand_spec.lua23
1 files changed, 23 insertions, 0 deletions
diff --git a/test/functional/ui/inccommand_spec.lua b/test/functional/ui/inccommand_spec.lua
index 712c1f377a..b6e2f2311f 100644
--- a/test/functional/ui/inccommand_spec.lua
+++ b/test/functional/ui/inccommand_spec.lua
@@ -1487,6 +1487,29 @@ describe("inccommand=nosplit", function()
]])
eq(eval('v:null'), eval('v:exiting'))
end)
+
+ it("does not break bar-separated command #8796", function()
+ source([[
+ function! F()
+ if v:false | return | endif
+ endfun
+ ]])
+ command('call timer_start(10, {-> F()}, {"repeat":-1})')
+ feed(':%s/')
+ sleep(20) -- Allow some timer activity.
+ screen:expect([[
+ Inc substitution on |
+ two lines |
+ Inc substitution on |
+ two lines |
+ |
+ {15:~ }|
+ {15:~ }|
+ {15:~ }|
+ {15:~ }|
+ :%s/^ |
+ ]])
+ end)
end)
describe(":substitute, 'inccommand' with a failing expression", function()