073263
To: vim_dev@googlegroups.com
073263
Subject: Patch 7.4.368
073263
Fcc: outbox
073263
From: Bram Moolenaar <Bram@moolenaar.net>
073263
Mime-Version: 1.0
073263
Content-Type: text/plain; charset=UTF-8
073263
Content-Transfer-Encoding: 8bit
073263
------------
073263
073263
Patch 7.4.368
073263
Problem:    Restoring the window sizes after closing the command line window
073263
	    doesn't work properly if there are nested splits.
073263
Solution:   Restore the sizes twice. (Hirohito Higashi)
073263
Files:	    src/window.c
073263
073263
073263
*** ../vim-7.4.367/src/window.c	2014-07-16 14:16:41.519771715 +0200
073263
--- src/window.c	2014-07-16 15:13:52.895701974 +0200
073263
***************
073263
*** 4848,4862 ****
073263
      garray_T	*gap;
073263
  {
073263
      win_T	*wp;
073263
!     int		i;
073263
  
073263
      if (win_count() * 2 == gap->ga_len)
073263
      {
073263
! 	i = 0;
073263
! 	for (wp = firstwin; wp != NULL; wp = wp->w_next)
073263
  	{
073263
! 	    frame_setwidth(wp->w_frame, ((int *)gap->ga_data)[i++]);
073263
! 	    win_setheight_win(((int *)gap->ga_data)[i++], wp);
073263
  	}
073263
  	/* recompute the window positions */
073263
  	(void)win_comp_pos();
073263
--- 4848,4867 ----
073263
      garray_T	*gap;
073263
  {
073263
      win_T	*wp;
073263
!     int		i, j;
073263
  
073263
      if (win_count() * 2 == gap->ga_len)
073263
      {
073263
! 	/* The order matters, because frames contain other frames, but it's
073263
! 	 * difficult to get right. The easy way out is to do it twice. */
073263
! 	for (j = 0; j < 2; ++j)
073263
  	{
073263
! 	    i = 0;
073263
! 	    for (wp = firstwin; wp != NULL; wp = wp->w_next)
073263
! 	    {
073263
! 		frame_setwidth(wp->w_frame, ((int *)gap->ga_data)[i++]);
073263
! 		win_setheight_win(((int *)gap->ga_data)[i++], wp);
073263
! 	    }
073263
  	}
073263
  	/* recompute the window positions */
073263
  	(void)win_comp_pos();
073263
*** ../vim-7.4.367/src/version.c	2014-07-16 14:42:37.923740082 +0200
073263
--- src/version.c	2014-07-16 15:14:46.035700894 +0200
073263
***************
073263
*** 736,737 ****
073263
--- 736,739 ----
073263
  {   /* Add new patch number below this line */
073263
+ /**/
073263
+     368,
073263
  /**/
073263
073263
-- 
073263
FROG: How you English say:  I one more time, mac, I unclog my nose towards
073263
      you, sons of a window-dresser,  so, you think you could out-clever us
073263
      French fellows with your silly knees-bent creeping about advancing
073263
      behaviour.  (blows a raspberry) I wave my private parts at your aunties,
073263
      you brightly-coloured, mealy-templed, cranberry-smelling, electric
073263
      donkey-bottom biters.
073263
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
073263
073263
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
073263
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
073263
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
073263
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///