updated for version 7.4.325 v7.4.325
authorBram Moolenaar <Bram@vim.org>
Fri, 13 Jun 2014 18:08:45 +0000 (20:08 +0200)
committerBram Moolenaar <Bram@vim.org>
Fri, 13 Jun 2014 18:08:45 +0000 (20:08 +0200)
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)

src/version.c
src/window.c

index 15db5ad50a211f6a5c70ef2716a270a2189a5568..0d0dfd2b44ddd62f1533547a00799c9fa449e0bd 100644 (file)
@@ -734,6 +734,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    325,
 /**/
     324,
 /**/
index f4dea1da1a4254fb678a75801cfbbebe857bf127..a94245a8184f2777f8639c9eb08791f936eff7ba 100644 (file)
@@ -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);
     }