lkundrak / rpms / vim

Forked from rpms/vim 4 years ago
Clone
bff8309
To: vim-dev@vim.org
bff8309
Subject: Patch 7.0.174
bff8309
Fcc: outbox
bff8309
From: Bram Moolenaar <Bram@moolenaar.net>
bff8309
Mime-Version: 1.0
bff8309
Content-Type: text/plain; charset=ISO-8859-1
bff8309
Content-Transfer-Encoding: 8bit
bff8309
------------
bff8309
bff8309
Patch 7.0.174
bff8309
Problem:    ":mksession" doesn't restore window layout correctly in tab pages
bff8309
	    other than the current one. (Zhibin He)
bff8309
Solution:   Use the correct topframe for producing the window layout commands.
bff8309
Files:	    src/ex_docmd.c
bff8309
bff8309
bff8309
*** ../vim-7.0.173/src/ex_docmd.c	Tue Nov 14 20:24:32 2006
bff8309
--- src/ex_docmd.c	Tue Nov 28 21:32:41 2006
bff8309
***************
bff8309
*** 9675,9680 ****
bff8309
--- 9675,9681 ----
bff8309
      win_T	*edited_win = NULL;
bff8309
      int		tabnr;
bff8309
      win_T	*tab_firstwin;
bff8309
+     frame_T	*tab_topframe;
bff8309
  
bff8309
      if (ssop_flags & SSOP_BUFFERS)
bff8309
  	only_save_windows = FALSE;		/* Save ALL buffers */
bff8309
***************
bff8309
*** 9786,9791 ****
bff8309
--- 9787,9793 ----
bff8309
       * autocommands.
bff8309
       */
bff8309
      tab_firstwin = firstwin;	/* first window in tab page "tabnr" */
bff8309
+     tab_topframe = topframe;
bff8309
      for (tabnr = 1; ; ++tabnr)
bff8309
      {
bff8309
  	int  need_tabnew = FALSE;
bff8309
***************
bff8309
*** 9797,9805 ****
bff8309
--- 9799,9813 ----
bff8309
  	    if (tp == NULL)
bff8309
  		break;		/* done all tab pages */
bff8309
  	    if (tp == curtab)
bff8309
+ 	    {
bff8309
  		tab_firstwin = firstwin;
bff8309
+ 		tab_topframe = topframe;
bff8309
+ 	    }
bff8309
  	    else
bff8309
+ 	    {
bff8309
  		tab_firstwin = tp->tp_firstwin;
bff8309
+ 		tab_topframe = tp->tp_topframe;
bff8309
+ 	    }
bff8309
  	    if (tabnr > 1)
bff8309
  		need_tabnew = TRUE;
bff8309
  	}
bff8309
***************
bff8309
*** 9838,9844 ****
bff8309
  	 */
bff8309
  	if (put_line(fd, "set splitbelow splitright") == FAIL)
bff8309
  	    return FAIL;
bff8309
! 	if (ses_win_rec(fd, topframe) == FAIL)
bff8309
  	    return FAIL;
bff8309
  	if (!p_sb && put_line(fd, "set nosplitbelow") == FAIL)
bff8309
  	    return FAIL;
bff8309
--- 9846,9852 ----
bff8309
  	 */
bff8309
  	if (put_line(fd, "set splitbelow splitright") == FAIL)
bff8309
  	    return FAIL;
bff8309
! 	if (ses_win_rec(fd, tab_topframe) == FAIL)
bff8309
  	    return FAIL;
bff8309
  	if (!p_sb && put_line(fd, "set nosplitbelow") == FAIL)
bff8309
  	    return FAIL;
bff8309
*** ../vim-7.0.173/src/version.c	Tue Nov 28 20:54:32 2006
bff8309
--- src/version.c	Tue Nov 28 21:40:07 2006
bff8309
***************
bff8309
*** 668,669 ****
bff8309
--- 668,671 ----
bff8309
  {   /* Add new patch number below this line */
bff8309
+ /**/
bff8309
+     174,
bff8309
  /**/
bff8309
bff8309
-- 
bff8309
ARTHUR:    Well, it doesn't matter.  Will you go and tell your master that
bff8309
           Arthur from the Court of Camelot is here.
bff8309
GUARD #1:  Listen, in order to maintain air-speed velocity, a swallow
bff8309
           needs to beat its wings 43 times every second, right?
bff8309
ARTHUR:    Please!
bff8309
                                  The Quest for the Holy Grail (Monty Python)
bff8309
bff8309
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
bff8309
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
bff8309
\\\        download, build and distribute -- http://www.A-A-P.org        ///
bff8309
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///