aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJames McCoy <jamessan@jamessan.com>2017-01-11 14:52:11 -0500
committerJames McCoy <jamessan@jamessan.com>2017-01-11 21:05:02 -0500
commitdcd77c64ef7865f47b9a6e86da033da8aaa3100c (patch)
treebbe41c876f4fb0ba48650f9e4bbf011dd130167c /test
parent207ba359b0127fa5893b980abcb9186ffec1879c (diff)
downloadrneovim-dcd77c64ef7865f47b9a6e86da033da8aaa3100c.tar.gz
rneovim-dcd77c64ef7865f47b9a6e86da033da8aaa3100c.tar.bz2
rneovim-dcd77c64ef7865f47b9a6e86da033da8aaa3100c.zip
inccommand: Suppress error reporting when previewing commands
Closes #5912
Diffstat (limited to 'test')
-rw-r--r--test/functional/ui/inccommand_spec.lua34
1 files changed, 34 insertions, 0 deletions
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('<enter>')
+ 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()