From df3abf4df08606dd35126377ceec051763618836 Mon Sep 17 00:00:00 2001 From: Bastian Winkler Date: Wed, 29 Apr 2015 20:29:41 +0200 Subject: vim-patch:7.4.706 #2546 Problem: Window drawn wrong when 'laststatus' is zero and there is a command-line window. (Yclept Nemo) Solution: Set the status height a bit later. (Christian Brabandt) https://github.com/vim/vim/commit/v7-4-706 --- src/nvim/version.c | 2 +- src/nvim/window.c | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/nvim/version.c b/src/nvim/version.c index 6b11809614..4bdd22e819 100644 --- a/src/nvim/version.c +++ b/src/nvim/version.c @@ -77,7 +77,7 @@ static int included_patches[] = { //709, //708, //707, - //706, + 706, //705, //704, //703, 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)) -- cgit