aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2020-03-14 11:38:43 -0400
committerJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2020-04-26 19:17:16 -0400
commit86d0f67c292ed51a981b643cf80a851f92c2b4da (patch)
tree529301ebd94ab604f1a88979db4783c43a1e807a /src
parent05f58a285863913341107fd4d551cca3a1885227 (diff)
downloadrneovim-86d0f67c292ed51a981b643cf80a851f92c2b4da.tar.gz
rneovim-86d0f67c292ed51a981b643cf80a851f92c2b4da.tar.bz2
rneovim-86d0f67c292ed51a981b643cf80a851f92c2b4da.zip
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
Diffstat (limited to 'src')
-rw-r--r--src/nvim/window.c5
1 files changed, 3 insertions, 2 deletions
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;