From dcd77c64ef7865f47b9a6e86da033da8aaa3100c Mon Sep 17 00:00:00 2001 From: James McCoy Date: Wed, 11 Jan 2017 14:52:11 -0500 Subject: inccommand: Suppress error reporting when previewing commands Closes #5912 --- test/functional/ui/inccommand_spec.lua | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) (limited to 'test') diff --git a/test/functional/ui/inccommand_spec.lua b/test/functional/ui/inccommand_spec.lua index 35aeb6e67c..b0b957aa7f 100644 --- a/test/functional/ui/inccommand_spec.lua +++ b/test/functional/ui/inccommand_spec.lua @@ -1201,6 +1201,40 @@ describe(":substitute, 'inccommand' with a failing expression", function() end end) + it('in the range does not error #5912', function() + for _, case in pairs(cases) do + refresh(case) + feed(':100s/') + + screen:expect([[ + Inc substitution on | + two lines | + | + {15:~ }| + {15:~ }| + {15:~ }| + {15:~ }| + {15:~ }| + {15:~ }| + :100s/^ | + ]]) + + feed('') + screen:expect([[ + Inc substitution on | + two lines | + ^ | + {15:~ }| + {15:~ }| + {15:~ }| + {15:~ }| + {15:~ }| + {15:~ }| + {14:E16: Invalid range} | + ]]) + end + end) + end) describe("'inccommand' and :cnoremap", function() -- cgit