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)
0816f473ab
This commit is contained in:
zeertzjq
2022-10-06 09:03:49 +08:00
committed by GitHub
parent 6ae4a6e071
commit bc64aa435b
4 changed files with 59 additions and 5 deletions

View File

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