mirror of
https://github.com/vim-airline/vim-airline.git
synced 2025-02-17 01:32:44 +08:00
Change event for tabline autoshow
Use TabNew/TabClosed for the "autoshow" event when tabline is used only for tabs (show_buffers==0). This fixes case of visible tabline when tab_min_count == 2 and user executes ':tabonly' command - the tabline should disappear but there is no TabEnter event triggered in this case. Closes #2389
This commit is contained in:
parent
b6f6cc9312
commit
3882146c41
|
@ -30,7 +30,7 @@ function! airline#extensions#tabline#autoshow#on()
|
|||
autocmd BufEnter * call <sid>show_tabline(s:buf_min_count, len(airline#extensions#tabline#buflist#list()))
|
||||
autocmd BufUnload * call <sid>show_tabline(s:buf_min_count, len(airline#extensions#tabline#buflist#list()) - 1)
|
||||
else
|
||||
autocmd TabEnter * call <sid>show_tabline(s:tab_min_count, tabpagenr('$'))
|
||||
autocmd TabNew,TabClosed * call <sid>show_tabline(s:tab_min_count, tabpagenr('$'))
|
||||
endif
|
||||
endif
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user