vim-patch:8.0.1334: splitting a window with a WinBar damages window layout

Problem:    Splitting a window with a WinBar damages window layout.
            (Lifepillar)
Solution:   Take the winbar into account when computing the new window
            position.  Add WINBAR_HEIGHT().
3167c3e701
This commit is contained in:
Jan Edmund Lazo
2020-03-14 11:38:43 -04:00
parent 05f58a2858
commit 86d0f67c29

View File

@@ -1472,8 +1472,9 @@ int win_split_ins(int size, int flags, win_T *new_wp, int dir)
wp->w_winrow = oldwin->w_winrow;
wp->w_status_height = STATUS_HEIGHT;
oldwin->w_winrow += wp->w_height + STATUS_HEIGHT;
} else { /* new window below current one */
wp->w_winrow = oldwin->w_winrow + oldwin->w_height + STATUS_HEIGHT;
} else { // new window below current one
wp->w_winrow = oldwin->w_winrow + oldwin->w_height
+ STATUS_HEIGHT + oldwin->w_winbar_height;
wp->w_status_height = oldwin->w_status_height;
if (!(flags & WSP_BOT)) {
oldwin->w_status_height = STATUS_HEIGHT;