Karsten Hopp 1a57c9
To: vim-dev@vim.org
Karsten Hopp 1a57c9
Subject: Patch 7.0.097
Karsten Hopp 1a57c9
Fcc: outbox
Karsten Hopp 1a57c9
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp 1a57c9
Mime-Version: 1.0
Karsten Hopp 1a57c9
Content-Type: text/plain; charset=ISO-8859-1
Karsten Hopp 1a57c9
Content-Transfer-Encoding: 8bit
Karsten Hopp 1a57c9
------------
Karsten Hopp 1a57c9
Karsten Hopp 1a57c9
Patch 7.0.097
Karsten Hopp 1a57c9
Problem:    ":tabclose N" that closes another tab page does not remove the tab
Karsten Hopp 1a57c9
	    pages line.  Same problem when using the mouse.
Karsten Hopp 1a57c9
Solution:   Adjust the tab pages line when needed in tabpage_close_other().
Karsten Hopp 1a57c9
Files:	    src/ex_docmd.c
Karsten Hopp 1a57c9
Karsten Hopp 1a57c9
Karsten Hopp 1a57c9
*** ../vim-7.0.096/src/ex_docmd.c	Tue Aug 29 17:28:56 2006
Karsten Hopp 1a57c9
--- src/ex_docmd.c	Sun Sep 10 15:47:33 2006
Karsten Hopp 1a57c9
***************
Karsten Hopp 1a57c9
*** 6296,6302 ****
Karsten Hopp 1a57c9
      exarg_T	*eap;
Karsten Hopp 1a57c9
  {
Karsten Hopp 1a57c9
      tabpage_T	*tp;
Karsten Hopp 1a57c9
-     int		h = tabline_height();
Karsten Hopp 1a57c9
  
Karsten Hopp 1a57c9
  # ifdef FEAT_CMDWIN
Karsten Hopp 1a57c9
      if (cmdwin_type != 0)
Karsten Hopp 1a57c9
--- 6296,6301 ----
Karsten Hopp 1a57c9
***************
Karsten Hopp 1a57c9
*** 6328,6336 ****
Karsten Hopp 1a57c9
  	       )
Karsten Hopp 1a57c9
  		tabpage_close(eap->forceit);
Karsten Hopp 1a57c9
  	}
Karsten Hopp 1a57c9
- 
Karsten Hopp 1a57c9
-     if (h != tabline_height())
Karsten Hopp 1a57c9
- 	shell_new_rows();
Karsten Hopp 1a57c9
  }
Karsten Hopp 1a57c9
  
Karsten Hopp 1a57c9
  /*
Karsten Hopp 1a57c9
--- 6327,6332 ----
Karsten Hopp 1a57c9
***************
Karsten Hopp 1a57c9
*** 6342,6348 ****
Karsten Hopp 1a57c9
  {
Karsten Hopp 1a57c9
      tabpage_T	*tp;
Karsten Hopp 1a57c9
      int		done;
Karsten Hopp 1a57c9
-     int		h = tabline_height();
Karsten Hopp 1a57c9
  
Karsten Hopp 1a57c9
  # ifdef FEAT_CMDWIN
Karsten Hopp 1a57c9
      if (cmdwin_type != 0)
Karsten Hopp 1a57c9
--- 6338,6343 ----
Karsten Hopp 1a57c9
***************
Karsten Hopp 1a57c9
*** 6371,6379 ****
Karsten Hopp 1a57c9
  		    break;
Karsten Hopp 1a57c9
  	    }
Karsten Hopp 1a57c9
  	}
Karsten Hopp 1a57c9
- 
Karsten Hopp 1a57c9
-     if (h != tabline_height())
Karsten Hopp 1a57c9
- 	shell_new_rows();
Karsten Hopp 1a57c9
  }
Karsten Hopp 1a57c9
  
Karsten Hopp 1a57c9
  /*
Karsten Hopp 1a57c9
--- 6366,6371 ----
Karsten Hopp 1a57c9
***************
Karsten Hopp 1a57c9
*** 6397,6402 ****
Karsten Hopp 1a57c9
--- 6389,6396 ----
Karsten Hopp 1a57c9
  /*
Karsten Hopp 1a57c9
   * Close tab page "tp", which is not the current tab page.
Karsten Hopp 1a57c9
   * Note that autocommands may make "tp" invalid.
Karsten Hopp 1a57c9
+  * Also takes care of the tab pages line disappearing when closing the
Karsten Hopp 1a57c9
+  * last-but-one tab page.
Karsten Hopp 1a57c9
   */
Karsten Hopp 1a57c9
      void
Karsten Hopp 1a57c9
  tabpage_close_other(tp, forceit)
Karsten Hopp 1a57c9
***************
Karsten Hopp 1a57c9
*** 6405,6410 ****
Karsten Hopp 1a57c9
--- 6399,6405 ----
Karsten Hopp 1a57c9
  {
Karsten Hopp 1a57c9
      int		done = 0;
Karsten Hopp 1a57c9
      win_T	*wp;
Karsten Hopp 1a57c9
+     int		h = tabline_height();
Karsten Hopp 1a57c9
  
Karsten Hopp 1a57c9
      /* Limit to 1000 windows, autocommands may add a window while we close
Karsten Hopp 1a57c9
       * one.  OK, so I'm paranoid... */
Karsten Hopp 1a57c9
***************
Karsten Hopp 1a57c9
*** 6418,6424 ****
Karsten Hopp 1a57c9
--- 6413,6422 ----
Karsten Hopp 1a57c9
  	if (!valid_tabpage(tp) || tp->tp_firstwin == wp)
Karsten Hopp 1a57c9
  	    break;
Karsten Hopp 1a57c9
      }
Karsten Hopp 1a57c9
+ 
Karsten Hopp 1a57c9
      redraw_tabline = TRUE;
Karsten Hopp 1a57c9
+     if (h != tabline_height())
Karsten Hopp 1a57c9
+ 	shell_new_rows();
Karsten Hopp 1a57c9
  }
Karsten Hopp 1a57c9
  
Karsten Hopp 1a57c9
  /*
Karsten Hopp 1a57c9
*** ../vim-7.0.096/src/version.c	Sun Sep 10 13:56:06 2006
Karsten Hopp 1a57c9
--- src/version.c	Sun Sep 10 15:44:24 2006
Karsten Hopp 1a57c9
***************
Karsten Hopp 1a57c9
*** 668,669 ****
Karsten Hopp 1a57c9
--- 668,671 ----
Karsten Hopp 1a57c9
  {   /* Add new patch number below this line */
Karsten Hopp 1a57c9
+ /**/
Karsten Hopp 1a57c9
+     97,
Karsten Hopp 1a57c9
  /**/
Karsten Hopp 1a57c9
Karsten Hopp 1a57c9
-- 
Karsten Hopp 1a57c9
Advice to worms:  Sleep late.
Karsten Hopp 1a57c9
Karsten Hopp 1a57c9
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp 1a57c9
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp 1a57c9
\\\        download, build and distribute -- http://www.A-A-P.org        ///
Karsten Hopp 1a57c9
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///