tabline: invalidate buffer list on Terminal Enter

should workaround and fix #1853 in a better way
This commit is contained in:
Christian Brabandt 2019-02-03 10:36:07 +01:00
parent 916d023c35
commit 1d03b9dc62
No known key found for this signature in database
GPG Key ID: F3F92DA383FDDE09

View File

@ -33,9 +33,11 @@ function! airline#extensions#tabline#buffers#off()
endfunction
function! airline#extensions#tabline#buffers#on()
let terminal_event = has("nvim") ? 'TermOpen' : 'TerminalOpen'
augroup airline_tabline_buffers
autocmd!
autocmd BufDelete * call airline#extensions#tabline#buflist#clean()
exe 'autocmd '. terminal_event. ' * call airline#extensions#tabline#buflist#clean()'
autocmd User BufMRUChange call airline#extensions#tabline#buflist#clean()
augroup END
endfunction