From 8ae492bb5af3e1b086f8fa48946c07aa2660da59 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Sun, 17 Aug 2014 22:02:02 +0000 Subject: [PATCH] vim-patch:7.4.325 #1078 Problem: When starting the gui and changing the window size the status line may not be drawn correctly. Solution: Catch new_win_height() being called recursively. (Christian Brabandt) https://code.google.com/p/vim/source/detail?r=1f288d247548 --- src/nvim/version.c | 2 +- src/nvim/window.c | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/nvim/version.c b/src/nvim/version.c index cbfffc93ad..f2a85d5b69 100644 --- a/src/nvim/version.c +++ b/src/nvim/version.c @@ -270,7 +270,7 @@ static int included_patches[] = { 328, 327, //326 NA - //325, + 325, //324, 323, //322 NA diff --git a/src/nvim/window.c b/src/nvim/window.c index 52401a12ee..ca56c9d5d5 100644 --- a/src/nvim/window.c +++ b/src/nvim/window.c @@ -4484,7 +4484,12 @@ void win_new_height(win_T *wp, int height) if (wp->w_height > 0) { if (wp == curwin) { - validate_cursor(); // w_wrow needs to be valid + // w_wrow needs to be valid. When setting 'laststatus' this may + // call win_new_height() recursively. + validate_cursor(); + } + if (wp->w_height != prev_height) { + return; // Recursive call already changed the size, bail out. } if (wp->w_wrow != wp->w_prev_fraction_row) { set_fraction(wp);