]> granicus.if.org Git - vim/commitdiff
updated for version 7.4.368 v7.4.368
authorBram Moolenaar <Bram@vim.org>
Wed, 16 Jul 2014 13:18:26 +0000 (15:18 +0200)
committerBram Moolenaar <Bram@vim.org>
Wed, 16 Jul 2014 13:18:26 +0000 (15:18 +0200)
Problem:    Restoring the window sizes after closing the command line window
            doesn't work properly if there are nested splits.
Solution:   Restore the sizes twice. (Hirohito Higashi)

src/version.c
src/window.c

index 1e031cb4de5c8d613d0a754485b022b4e2632d37..407541af05835318b8c6062030a56a3fbd30e454 100644 (file)
@@ -734,6 +734,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    368,
 /**/
     367,
 /**/
index 482692ffc912a3d9f51ef6ad7867020f9d0169b9..cbf0ff86b4a0e43423b87eaf472189f2484e2c3e 100644 (file)
@@ -4848,15 +4848,20 @@ win_size_restore(gap)
     garray_T   *gap;
 {
     win_T      *wp;
-    int                i;
+    int                i, j;
 
     if (win_count() * 2 == gap->ga_len)
     {
-       i = 0;
-       for (wp = firstwin; wp != NULL; wp = wp->w_next)
+       /* The order matters, because frames contain other frames, but it's
+        * difficult to get right. The easy way out is to do it twice. */
+       for (j = 0; j < 2; ++j)
        {
-           frame_setwidth(wp->w_frame, ((int *)gap->ga_data)[i++]);
-           win_setheight_win(((int *)gap->ga_data)[i++], wp);
+           i = 0;
+           for (wp = firstwin; wp != NULL; wp = wp->w_next)
+           {
+               frame_setwidth(wp->w_frame, ((int *)gap->ga_data)[i++]);
+               win_setheight_win(((int *)gap->ga_data)[i++], wp);
+           }
        }
        /* recompute the window positions */
        (void)win_comp_pos();