mirror of
https://github.com/neovim/neovim.git
synced 2026-08-26 00:51:53 +00:00
fix(window): 'winbar' in single-row win overlaps global 'statusline' #41188
This commit is contained in:
@@ -7273,16 +7273,13 @@ static bool resize_frame_for_status(frame_T *fr)
|
||||
// @return Success or failure.
|
||||
static bool resize_frame_for_winbar(frame_T *fr)
|
||||
{
|
||||
win_T *wp = fr->fr_win;
|
||||
frame_T *fp = find_horizontally_resizable_frame(fr);
|
||||
int old_height = fr->fr_height;
|
||||
|
||||
if (fp == NULL || fp == fr) {
|
||||
frame_setheight(fr, old_height + 1, false);
|
||||
if (fr->fr_height == old_height) {
|
||||
emsg(_(e_noroom));
|
||||
return false;
|
||||
}
|
||||
frame_new_height(fp, fp->fr_height - 1, false, false, false);
|
||||
win_new_height(wp, wp->w_height + 1);
|
||||
frame_fix_height(wp);
|
||||
win_comp_pos();
|
||||
|
||||
return true;
|
||||
|
||||
@@ -570,6 +570,26 @@ describe('winbar', function()
|
||||
|
|
||||
]])
|
||||
end)
|
||||
|
||||
it('making room for a winbar does not overlap the global statusline #41140', function()
|
||||
n.exec([[
|
||||
set winbar= laststatus=3
|
||||
vsplit
|
||||
split
|
||||
resize 1
|
||||
setlocal winbar=top
|
||||
resize 1000
|
||||
]])
|
||||
screen:expect([[
|
||||
{1:top }│ |
|
||||
^ │{3:~ }|
|
||||
{3:~ }│{3:~ }|*7
|
||||
──────────────────────────────┤{3:~ }|
|
||||
│{3:~ }|
|
||||
{4:[No Name] }|
|
||||
|
|
||||
]])
|
||||
end)
|
||||
end)
|
||||
|
||||
describe('local winbar with tabs', function()
|
||||
|
||||
Reference in New Issue
Block a user