mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
vim-patch:7.4.2077
Problem: Cannot update 'tabline' when a tab was closed.
Solution: Add the TabClosed autocmd event. (partly by Felipe Morales)
12c11d5530
This commit is contained in:
parent
c2344f3d31
commit
f5d06c52a2
@ -990,6 +990,11 @@ WinLeave Before leaving a window. If the window to be
|
|||||||
WinLeave autocommands (but not for ":new").
|
WinLeave autocommands (but not for ":new").
|
||||||
Not used for ":qa" or ":q" when exiting Vim.
|
Not used for ":qa" or ":q" when exiting Vim.
|
||||||
|
|
||||||
|
*WinNew*
|
||||||
|
WinNew When a new window was created. Not done for
|
||||||
|
the fist window, when Vim has just started.
|
||||||
|
Before a WinEnter event.
|
||||||
|
|
||||||
==============================================================================
|
==============================================================================
|
||||||
6. Patterns *autocmd-patterns* *{pat}*
|
6. Patterns *autocmd-patterns* *{pat}*
|
||||||
|
|
||||||
|
@ -90,6 +90,7 @@ func Test_win_tab_autocmd()
|
|||||||
au WinEnter * call add(g:record, 'WinEnter')
|
au WinEnter * call add(g:record, 'WinEnter')
|
||||||
au WinLeave * call add(g:record, 'WinLeave')
|
au WinLeave * call add(g:record, 'WinLeave')
|
||||||
au TabNew * call add(g:record, 'TabNew')
|
au TabNew * call add(g:record, 'TabNew')
|
||||||
|
au TabClosed * call add(g:record, 'TabClosed')
|
||||||
au TabEnter * call add(g:record, 'TabEnter')
|
au TabEnter * call add(g:record, 'TabEnter')
|
||||||
au TabLeave * call add(g:record, 'TabLeave')
|
au TabLeave * call add(g:record, 'TabLeave')
|
||||||
augroup END
|
augroup END
|
||||||
@ -102,10 +103,21 @@ func Test_win_tab_autocmd()
|
|||||||
call assert_equal([
|
call assert_equal([
|
||||||
\ 'WinLeave', 'WinNew', 'WinEnter',
|
\ 'WinLeave', 'WinNew', 'WinEnter',
|
||||||
\ 'WinLeave', 'TabLeave', 'WinNew', 'WinEnter', 'TabNew', 'TabEnter',
|
\ 'WinLeave', 'TabLeave', 'WinNew', 'WinEnter', 'TabNew', 'TabEnter',
|
||||||
\ 'WinLeave', 'TabLeave', 'WinEnter', 'TabEnter',
|
\ 'WinLeave', 'TabLeave', 'TabClosed', 'WinEnter', 'TabEnter',
|
||||||
\ 'WinLeave', 'WinEnter'
|
\ 'WinLeave', 'WinEnter'
|
||||||
\ ], g:record)
|
\ ], g:record)
|
||||||
|
|
||||||
|
let g:record = []
|
||||||
|
tabnew somefile
|
||||||
|
tabnext
|
||||||
|
bwipe somefile
|
||||||
|
|
||||||
|
call assert_equal([
|
||||||
|
\ 'WinLeave', 'TabLeave', 'WinNew', 'WinEnter', 'TabNew', 'TabEnter',
|
||||||
|
\ 'WinLeave', 'TabLeave', 'WinEnter', 'TabEnter',
|
||||||
|
\ 'TabClosed'
|
||||||
|
\ ], g:record)
|
||||||
|
|
||||||
augroup testing
|
augroup testing
|
||||||
au!
|
au!
|
||||||
augroup END
|
augroup END
|
||||||
|
Loading…
Reference in New Issue
Block a user