summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2014-07-16 15:18:26 +0200
committerBram Moolenaar <Bram@vim.org>2014-07-16 15:18:26 +0200
commitb643e777824c76034cbd8e77f603a0b98f2b26fb (patch)
treeb0b50521d83fe9bdf31513f21fb6d6dab326071c
parentf1924a9d8c6b0bad30b5ac7aabb853150d4e6e5b (diff)
downloadvim-git-b643e777824c76034cbd8e77f603a0b98f2b26fb.tar.gz
updated for version 7.4.368v7.4.368
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)
-rw-r--r--src/version.c2
-rw-r--r--src/window.c15
2 files changed, 12 insertions, 5 deletions
diff --git a/src/version.c b/src/version.c
index 1e031cb4d..407541af0 100644
--- 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 */
/**/
+ 368,
+/**/
367,
/**/
366,
diff --git a/src/window.c b/src/window.c
index 482692ffc..cbf0ff86b 100644
--- a/src/window.c
+++ b/src/window.c
@@ -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();