0
0
mirror of https://github.com/vim/vim.git synced 2025-09-25 03:54:15 -04:00

updated for version 7.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)
This commit is contained in:
Bram Moolenaar
2014-07-16 15:18:26 +02:00
parent f1924a9d8c
commit b643e77782
2 changed files with 12 additions and 5 deletions

View File

@@ -734,6 +734,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
368,
/**/ /**/
367, 367,
/**/ /**/

View File

@@ -4848,15 +4848,20 @@ win_size_restore(gap)
garray_T *gap; garray_T *gap;
{ {
win_T *wp; win_T *wp;
int i; int i, j;
if (win_count() * 2 == gap->ga_len) if (win_count() * 2 == gap->ga_len)
{ {
i = 0; /* The order matters, because frames contain other frames, but it's
for (wp = firstwin; wp != NULL; wp = wp->w_next) * 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++]); i = 0;
win_setheight_win(((int *)gap->ga_data)[i++], wp); 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 */ /* recompute the window positions */
(void)win_comp_pos(); (void)win_comp_pos();