fix test failure

This commit is contained in:
lonerover 2017-01-09 13:06:24 +08:00
parent a584375e9f
commit 2b56cf099a
2 changed files with 9 additions and 3 deletions

View File

@ -1719,6 +1719,7 @@ close_windows (
{ {
tabpage_T *tp, *nexttp; tabpage_T *tp, *nexttp;
int h = tabline_height(); int h = tabline_height();
int count = tabpage_index(NULL);
++RedrawingDisabled; ++RedrawingDisabled;
@ -1755,9 +1756,14 @@ close_windows (
--RedrawingDisabled; --RedrawingDisabled;
redraw_tabline = TRUE; if (count != tabpage_index(NULL)) {
if (h != tabline_height()) apply_autocmds(EVENT_TABCLOSED, NULL, NULL, false, curbuf);
}
redraw_tabline = true;
if (h != tabline_height()) {
shell_new_rows(); shell_new_rows();
}
} }
/// Check that current window is the last one. /// Check that current window is the last one.

View File

@ -12,8 +12,8 @@ describe('autocmds:', function()
local expected = { local expected = {
'WinLeave', 'WinLeave',
'TabLeave', 'TabLeave',
'TabNew',
'WinEnter', 'WinEnter',
'TabNew',
'TabEnter', 'TabEnter',
'BufLeave', 'BufLeave',
'BufEnter' 'BufEnter'