changeset 5969:1f288d247548 v7.4.325

updated for version 7.4.325 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)
author Bram Moolenaar <bram@vim.org>
date Fri, 13 Jun 2014 20:08:45 +0200
parents 92751673cc37
children 0509d27e2127
files src/version.c src/window.c
diffstat 2 files changed, 8 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/version.c
+++ b/src/version.c
@@ -735,6 +735,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    325,
+/**/
     324,
 /**/
     323,
--- a/src/window.c
+++ b/src/window.c
@@ -5660,7 +5660,12 @@ win_new_height(wp, 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 here
+			to avoid the following to mess things up. */
 	if (wp->w_wrow != wp->w_prev_fraction_row)
 	    set_fraction(wp);
     }