fix(ui): make winbar work with floats and multigrid

This commit is contained in:
bfredl
2022-05-18 13:51:59 +02:00
parent c28192e6f9
commit 17758fe7ad
5 changed files with 93 additions and 4 deletions

View File

@@ -183,7 +183,7 @@ void os_breakcheck(void)
// We do not want screen_resize() to redraw here.
// TODO(bfredl): we are already special casing redraw events, is this
// hack still needed?
updating_screen++;
updating_screen = true;
loop_poll_events(&main_loop, 0);

View File

@@ -5324,8 +5324,10 @@ static void win_redr_custom(win_T *wp, bool draw_winbar, bool draw_ruler)
use_sandbox = was_set_insecurely(wp, "tabline", 0);
} else if (draw_winbar) {
stl = (char_u *)((*wp->w_p_wbr != NUL) ? wp->w_p_wbr : p_wbr);
row = wp->w_winrow;
col = wp->w_wincol;
row = -1; // row zero is first row of text
col = 0;
grid = &wp->w_grid;
grid_adjust(&grid, &row, &col);
fillchar = wp->w_p_fcs_chars.wbr;
attr = (wp == curwin) ? HL_ATTR(HLF_WBR) : HL_ATTR(HLF_WBRNC);
maxwidth = wp->w_width_inner;

View File

@@ -6296,7 +6296,7 @@ void win_set_inner_size(win_T *wp)
static int win_extra_height(win_T *wp)
{
return wp->w_border_adj[0] + wp->w_border_adj[2];
return wp->w_border_adj[0] + wp->w_border_adj[2] + wp->w_winbar_height;
}
static int win_extra_width(win_T *wp)