From 51af911a271eb95c0032d25bef5e9313b81648b9 Mon Sep 17 00:00:00 2001 From: Nimit Bhardwaj Date: Wed, 11 Apr 2018 22:16:05 +0530 Subject: inccommand: do not execute trailing commands #8256 fix #7494 --- test/functional/ui/inccommand_spec.lua | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'test') diff --git a/test/functional/ui/inccommand_spec.lua b/test/functional/ui/inccommand_spec.lua index 27e4066d9f..7dfe59b8b0 100644 --- a/test/functional/ui/inccommand_spec.lua +++ b/test/functional/ui/inccommand_spec.lua @@ -1354,6 +1354,23 @@ describe("inccommand=nosplit", function() :echo 'foo'^ | ]]) end) + + it("does not execute trailing bar-separated commands #7494", function() + feed(':%s/two/three/g|q!') + screen:expect([[ + Inc substitution on | + {12:three} lines | + Inc substitution on | + {12:three} lines | + | + {15:~ }| + {15:~ }| + {15:~ }| + {15:~ }| + :%s/two/three/g|q!^ | + ]]) + eq(eval('v:null'), eval('v:exiting')) + end) end) describe(":substitute, 'inccommand' with a failing expression", function() -- cgit