diff options
Diffstat (limited to 'src/nvim/window.c')
-rw-r--r-- | src/nvim/window.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/nvim/window.c b/src/nvim/window.c index f93e88deb2..f69d3aa78c 100644 --- a/src/nvim/window.c +++ b/src/nvim/window.c @@ -911,12 +911,19 @@ int win_split_ins(int size, int flags, win_T *new_wp, int dir) } else { /* new window below current one */ wp->w_winrow = oldwin->w_winrow + oldwin->w_height + STATUS_HEIGHT; wp->w_status_height = oldwin->w_status_height; - oldwin->w_status_height = STATUS_HEIGHT; + // Don't set the status_height for oldwin yet, this might break + // frame_fix_height(oldwin), therefore will be set below. } if (flags & WSP_BOT) frame_add_statusline(curfrp); frame_fix_height(wp); frame_fix_height(oldwin); + + if (!before) { + // New window above current one, set the status_height after + // frame_fix_height(oldwin) + oldwin->w_status_height = STATUS_HEIGHT; + } } if (flags & (WSP_TOP | WSP_BOT)) |