aboutsummaryrefslogtreecommitdiff
path: root/test/functional/legacy/cmdline_spec.lua
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-10-06 09:03:49 +0800
committerGitHub <noreply@github.com>2022-10-06 09:03:49 +0800
commitbc64aa435b84bb3a43501e101c51507c75fbd349 (patch)
treebb75d9fed367173cd77bcbf6ccc8206a9c476f95 /test/functional/legacy/cmdline_spec.lua
parent6ae4a6e0711035a8a0801dd6fdb545e020bccd70 (diff)
downloadrneovim-bc64aa435b84bb3a43501e101c51507c75fbd349.tar.gz
rneovim-bc64aa435b84bb3a43501e101c51507c75fbd349.tar.bz2
rneovim-bc64aa435b84bb3a43501e101c51507c75fbd349.zip
vim-patch:9.0.0665: setting 'cmdheight' has no effect if last window was resized (#20500)
Problem: Setting 'cmdheight' has no effect if last window was resized. Solution: Do apply 'cmdheight' when told to. Use the frame height instead of the cmdline_row. (closes vim/vim#11286) https://github.com/vim/vim/commit/0816f473ab2f6cf7d8311c0f97371cada7f20d18
Diffstat (limited to 'test/functional/legacy/cmdline_spec.lua')
-rw-r--r--test/functional/legacy/cmdline_spec.lua41
1 files changed, 41 insertions, 0 deletions
diff --git a/test/functional/legacy/cmdline_spec.lua b/test/functional/legacy/cmdline_spec.lua
index 88912b9cd4..e7f5c780dc 100644
--- a/test/functional/legacy/cmdline_spec.lua
+++ b/test/functional/legacy/cmdline_spec.lua
@@ -172,6 +172,47 @@ describe('cmdline', function()
|
]])
end)
+
+ it("setting 'cmdheight' works after outputting two messages vim-patch:9.0.0665", function()
+ local screen = Screen.new(60, 8)
+ screen:set_default_attr_ids({
+ [0] = {bold = true, foreground = Screen.colors.Blue}, -- NonText
+ [1] = {bold = true, reverse = true}, -- StatusLine
+ })
+ screen:attach()
+ exec([[
+ set cmdheight=1 laststatus=2
+ func EchoTwo()
+ set laststatus=2
+ set cmdheight=5
+ echo 'foo'
+ echo 'bar'
+ set cmdheight=1
+ endfunc
+ ]])
+ feed(':call EchoTwo()')
+ screen:expect([[
+ |
+ {0:~ }|
+ {0:~ }|
+ {0:~ }|
+ {0:~ }|
+ {0:~ }|
+ {1:[No Name] }|
+ :call EchoTwo()^ |
+ ]])
+ feed('<CR>')
+ screen:expect([[
+ ^ |
+ {0:~ }|
+ {0:~ }|
+ {0:~ }|
+ {0:~ }|
+ {0:~ }|
+ {1:[No Name] }|
+ |
+ ]])
+ end)
end)
describe('cmdwin', function()