aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ui/cmdline_spec.lua
diff options
context:
space:
mode:
authorBjörn Linse <bjorn.linse@gmail.com>2018-02-14 19:23:11 +0100
committerGitHub <noreply@github.com>2018-02-14 19:23:11 +0100
commit77286915a8d90d358860a64e3beee10054cd8a84 (patch)
treea2afa6523df6f29a4e2c570f249eeca58ba042c5 /test/functional/ui/cmdline_spec.lua
parent674cb2afde0d82557c8e3afdf706cd6f75195fa5 (diff)
parentd9497053e84aaf3dabecd362da19913811e8c22e (diff)
downloadrneovim-77286915a8d90d358860a64e3beee10054cd8a84.tar.gz
rneovim-77286915a8d90d358860a64e3beee10054cd8a84.tar.bz2
rneovim-77286915a8d90d358860a64e3beee10054cd8a84.zip
Merge pull request #8008 from bfredl/arrayfree
ex_getln: clear cmdline_block after it's freed
Diffstat (limited to 'test/functional/ui/cmdline_spec.lua')
-rw-r--r--test/functional/ui/cmdline_spec.lua29
1 files changed, 29 insertions, 0 deletions
diff --git a/test/functional/ui/cmdline_spec.lua b/test/functional/ui/cmdline_spec.lua
index d15afc81bb..f8680678ef 100644
--- a/test/functional/ui/cmdline_spec.lua
+++ b/test/functional/ui/cmdline_spec.lua
@@ -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([[