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