a945b75
To: vim_dev@googlegroups.com
a945b75
Subject: Patch 7.4.281
a945b75
Fcc: outbox
a945b75
From: Bram Moolenaar <Bram@moolenaar.net>
a945b75
Mime-Version: 1.0
a945b75
Content-Type: text/plain; charset=UTF-8
a945b75
Content-Transfer-Encoding: 8bit
a945b75
------------
a945b75
a945b75
Patch 7.4.281
a945b75
Problem:    When a session file has more than one tabpage and 'showtabline' is
a945b75
	    one the positions may be slightly off.
a945b75
Solution:   Set 'showtabline' to two while positioning windows.
a945b75
Files:	    src/ex_docmd.c
a945b75
a945b75
a945b75
*** ../vim-7.4.280/src/ex_docmd.c	2014-04-29 12:15:22.856032651 +0200
a945b75
--- src/ex_docmd.c	2014-05-07 21:07:56.249296154 +0200
a945b75
***************
a945b75
*** 10290,10295 ****
a945b75
--- 10290,10296 ----
a945b75
      char_u	*sname;
a945b75
      win_T	*edited_win = NULL;
a945b75
      int		tabnr;
a945b75
+     int		restore_stal = FALSE;
a945b75
      win_T	*tab_firstwin;
a945b75
      frame_T	*tab_topframe;
a945b75
      int		cur_arg_idx = 0;
a945b75
***************
a945b75
*** 10399,10404 ****
a945b75
--- 10400,10418 ----
a945b75
  #endif
a945b75
  
a945b75
      /*
a945b75
+      * When there are two or more tabpages and 'showtabline' is 1 the tabline
a945b75
+      * will be displayed when creating the next tab.  That resizes the windows
a945b75
+      * in the first tab, which may cause problems.  Set 'showtabline' to 2
a945b75
+      * temporarily to avoid that.
a945b75
+      */
a945b75
+     if (p_stal == 1 && first_tabpage->tp_next != NULL)
a945b75
+     {
a945b75
+ 	if (put_line(fd, "set stal=2") == FAIL)
a945b75
+ 	    return FAIL;
a945b75
+ 	restore_stal = TRUE;
a945b75
+     }
a945b75
+ 
a945b75
+     /*
a945b75
       * May repeat putting Windows for each tab, when "tabpages" is in
a945b75
       * 'sessionoptions'.
a945b75
       * Don't use goto_tabpage(), it may change directory and trigger
a945b75
***************
a945b75
*** 10548,10553 ****
a945b75
--- 10562,10569 ----
a945b75
  		|| put_eol(fd) == FAIL)
a945b75
  	    return FAIL;
a945b75
      }
a945b75
+     if (restore_stal && put_line(fd, "set stal=1") == FAIL)
a945b75
+ 	return FAIL;
a945b75
  
a945b75
      /*
a945b75
       * Wipe out an empty unnamed buffer we started in.
a945b75
*** ../vim-7.4.280/src/version.c	2014-05-07 20:25:30.845273872 +0200
a945b75
--- src/version.c	2014-05-07 21:11:24.925297981 +0200
a945b75
***************
a945b75
*** 736,737 ****
a945b75
--- 736,739 ----
a945b75
  {   /* Add new patch number below this line */
a945b75
+ /**/
a945b75
+     281,
a945b75
  /**/
a945b75
a945b75
-- 
a945b75
hundred-and-one symptoms of being an internet addict:
a945b75
122. You ask if the Netaholics Anonymous t-shirt you ordered can be
a945b75
     sent to you via e-mail.
a945b75
a945b75
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
a945b75
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
a945b75
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
a945b75
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///