ex_getln: clear cmdline_block after it's freed

This commit is contained in:
Björn Linse
2018-02-13 19:47:27 +01:00
parent 0f1bc5ddce
commit d9497053e8
2 changed files with 32 additions and 1 deletions

View File

@@ -348,6 +348,35 @@ describe('external cmdline', function()
{ { {}, ' line1'} } }, block)
end)
feed('endfunction<cr>')
screen:expect([[
^ |
{1:~ }|
{1:~ }|
{1:~ }|
|
]], nil, nil, function()
eq(nil, block)
end)
-- Try once more, to check buffer is reinitialized. #8007
feed(':function Bar()<cr>')
screen:expect([[
^ |
{1:~ }|
{1:~ }|
{1:~ }|
|
]], nil, nil, function()
eq({{
content = { { {}, "" } },
firstc = ":",
indent = 2,
pos = 0,
prompt = "",
}}, cmdline)
eq({ { { {}, 'function Bar()'} } }, block)
end)
feed('endfunction<cr>')
screen:expect([[