inccommand: Suppress error reporting when previewing commands

Closes #5912
This commit is contained in:
James McCoy
2017-01-11 14:52:11 -05:00
parent 207ba359b0
commit dcd77c64ef
3 changed files with 36 additions and 2 deletions

View File

@@ -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()