tabline: Correctly trigger on BufDelete autocommand

fixes #399
This commit is contained in:
Christian Brabandt 2018-07-13 22:29:34 +02:00
parent 821372b9cf
commit 5aef1b90e5
No known key found for this signature in database
GPG Key ID: F3F92DA383FDDE09
2 changed files with 7 additions and 3 deletions

View File

@ -35,9 +35,8 @@ endfunction
function! airline#extensions#tabline#buffers#on()
augroup airline_tabline_buffers
autocmd!
autocmd BufDelete * call airline#extensions#tabline#buffers#invalidate()
autocmd User BufMRUChange call airline#extensions#tabline#buflist#invalidate()
autocmd User BufMRUChange call airline#extensions#tabline#buffers#invalidate()
autocmd BufDelete * call airline#extensions#tabline#buflist#clean()
autocmd User BufMRUChange call airline#extensions#tabline#buflist#clean()
augroup END
endfunction

View File

@ -7,6 +7,11 @@ function! airline#extensions#tabline#buflist#invalidate()
unlet! s:current_buffer_list
endfunction
function! airline#extensions#tabline#buflist#clean()
call airline#extensions#tabline#buflist#invalidate()
call airline#extensions#tabline#buffers#invalidate()
endfunction
" paths in excludes list
function! s:ExcludePaths(nr, exclude_paths)
let bpath = fnamemodify(bufname(a:nr), ":p")