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