fix(inccommand): block errors when parsing command line again (#24374)

Revert the change to ex_getln.c from a741c7fd04
This commit is contained in:
zeertzjq
2023-07-17 10:15:45 +08:00
committed by GitHub
parent f660b79480
commit b60a2ab4cb
2 changed files with 21 additions and 2 deletions

View File

@@ -3086,8 +3086,7 @@ end)
it('long :%s/ with inccommand does not collapse cmdline', function()
clear()
local screen = Screen.new(10,5)
common_setup(screen)
command('set inccommand=nosplit')
common_setup(screen, 'nosplit')
feed(':%s/AAAAAAA', 'A', 'A', 'A', 'A', 'A', 'A', 'A', 'A', 'A', 'A', 'A',
'A', 'A', 'A', 'A', 'A', 'A', 'A', 'A', 'A')
screen:expect([[
@@ -3099,6 +3098,21 @@ it('long :%s/ with inccommand does not collapse cmdline', function()
]])
end)
it("with 'inccommand' typing invalid `={expr}` does not show error", function()
clear()
local screen = Screen.new(30, 6)
common_setup(screen, 'nosplit')
feed(':edit `=`')
screen:expect([[
|
{15:~ }|
{15:~ }|
{15:~ }|
{15:~ }|
:edit `=`^ |
]])
end)
it("with 'inccommand' typing :filter doesn't segfault or leak memory #19057", function()
clear()
common_setup(nil, 'nosplit')