mirror of
https://github.com/neovim/neovim.git
synced 2025-10-18 07:41:51 +00:00
fix(window): fix equalization with cmdheight=0 (#20369)
This commit is contained in:
@@ -2239,7 +2239,7 @@ static void win_equal_rec(win_T *next_curwin, bool current, frame_T *topfr, int
|
|||||||
// Compute maximum number of windows vertically in this frame.
|
// Compute maximum number of windows vertically in this frame.
|
||||||
n = frame_minheight(topfr, NOWIN);
|
n = frame_minheight(topfr, NOWIN);
|
||||||
// add one for the bottom window if it doesn't have a statusline or separator
|
// add one for the bottom window if it doesn't have a statusline or separator
|
||||||
if (row + height == cmdline_row && p_ls == 0) {
|
if (row + height >= cmdline_row && p_ls == 0) {
|
||||||
extra_sep = STATUS_HEIGHT;
|
extra_sep = STATUS_HEIGHT;
|
||||||
} else if (global_stl_height() > 0) {
|
} else if (global_stl_height() > 0) {
|
||||||
extra_sep = 1;
|
extra_sep = 1;
|
||||||
|
@@ -1358,4 +1358,61 @@ describe('cmdheight=0', function()
|
|||||||
:echo^ |
|
:echo^ |
|
||||||
]])
|
]])
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
it('window equalization with laststatus=0 #20367', function()
|
||||||
|
screen:try_resize(60, 9)
|
||||||
|
command('set cmdheight=0 laststatus=0')
|
||||||
|
command('vsplit')
|
||||||
|
screen:expect([[
|
||||||
|
^ │ |
|
||||||
|
{1:~ }│{1:~ }|
|
||||||
|
{1:~ }│{1:~ }|
|
||||||
|
{1:~ }│{1:~ }|
|
||||||
|
{1:~ }│{1:~ }|
|
||||||
|
{1:~ }│{1:~ }|
|
||||||
|
{1:~ }│{1:~ }|
|
||||||
|
{1:~ }│{1:~ }|
|
||||||
|
{1:~ }│{1:~ }|
|
||||||
|
]])
|
||||||
|
feed(':')
|
||||||
|
command('split')
|
||||||
|
feed('<Esc>')
|
||||||
|
screen:expect([[
|
||||||
|
^ │ |
|
||||||
|
{1:~ }│{1:~ }|
|
||||||
|
{1:~ }│{1:~ }|
|
||||||
|
{1:~ }│{1:~ }|
|
||||||
|
{2:[No Name] }│{1:~ }|
|
||||||
|
│{1:~ }|
|
||||||
|
{1:~ }│{1:~ }|
|
||||||
|
{1:~ }│{1:~ }|
|
||||||
|
{1:~ }│{1:~ }|
|
||||||
|
]])
|
||||||
|
command('resize 2')
|
||||||
|
screen:expect([[
|
||||||
|
^ │ |
|
||||||
|
{1:~ }│{1:~ }|
|
||||||
|
{2:[No Name] }│{1:~ }|
|
||||||
|
│{1:~ }|
|
||||||
|
{1:~ }│{1:~ }|
|
||||||
|
{1:~ }│{1:~ }|
|
||||||
|
{1:~ }│{1:~ }|
|
||||||
|
{1:~ }│{1:~ }|
|
||||||
|
{1:~ }│{1:~ }|
|
||||||
|
]])
|
||||||
|
feed(':')
|
||||||
|
command('wincmd =')
|
||||||
|
feed('<Esc>')
|
||||||
|
screen:expect([[
|
||||||
|
^ │ |
|
||||||
|
{1:~ }│{1:~ }|
|
||||||
|
{1:~ }│{1:~ }|
|
||||||
|
{1:~ }│{1:~ }|
|
||||||
|
{2:[No Name] }│{1:~ }|
|
||||||
|
│{1:~ }|
|
||||||
|
{1:~ }│{1:~ }|
|
||||||
|
{1:~ }│{1:~ }|
|
||||||
|
{1:~ }│{1:~ }|
|
||||||
|
]])
|
||||||
|
end)
|
||||||
end)
|
end)
|
||||||
|
Reference in New Issue
Block a user