From 86d0f67c292ed51a981b643cf80a851f92c2b4da Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sat, 14 Mar 2020 11:38:43 -0400 Subject: 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(). https://github.com/vim/vim/commit/3167c3e7010ac7e2fd7d3aa198dd2d1dcff8ecc8 --- src/nvim/window.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/nvim/window.c b/src/nvim/window.c index 13d1dbbce9..fe6f829a5f 100644 --- a/src/nvim/window.c +++ b/src/nvim/window.c @@ -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; -- cgit