From 4e49e442595f901ca2c3c76f3bef8e093489a438 Mon Sep 17 00:00:00 2001 From: Jit Yao Yap Date: Fri, 22 Mar 2019 22:05:30 +0800 Subject: [PATCH] Update to restore layout only for non-floating windows --- src/nvim/window.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/nvim/window.c b/src/nvim/window.c index e1165e6ee9..8355f5397f 100644 --- a/src/nvim/window.c +++ b/src/nvim/window.c @@ -4656,12 +4656,12 @@ void win_size_restore(garray_T *gap) { int i = 0; FOR_ALL_WINDOWS_IN_TAB(wp, curtab) { - if (wp->w_floating) { - win_setwidth_win(((int *)gap->ga_data)[i++], wp); - } else { - frame_setwidth(wp->w_frame, ((int *)gap->ga_data)[i++]); + int width = ((int *)gap->ga_data)[i++]; + int height = ((int *)gap->ga_data)[i++]; + if (!wp->w_floating) { + frame_setwidth(wp->w_frame, width); + win_setheight_win(height, wp); } - win_setheight_win(((int *)gap->ga_data)[i++], wp); } } /* recompute the window positions */