mirror of
https://github.com/gryf/tagbar.git
synced 2025-12-17 19:40:27 +01:00
Don't force processing on BufReadPost, closes #170
This prevents files being processed twice unnecessarily, once for FileType and once for BufReadPost. All cases where BufReadPost is called without FileType should be covered by the checks in AutoUpdate().
This commit is contained in:
@@ -964,9 +964,9 @@ function! s:CreateAutocommands() abort
|
||||
autocmd WinEnter __Tagbar__ call s:SetStatusLine('current')
|
||||
autocmd WinLeave __Tagbar__ call s:SetStatusLine('noncurrent')
|
||||
|
||||
autocmd BufReadPost,BufWritePost * call
|
||||
autocmd BufWritePost * call
|
||||
\ s:AutoUpdate(fnamemodify(expand('<afile>'), ':p'), 1)
|
||||
autocmd BufEnter,CursorHold,FileType * call
|
||||
autocmd BufReadPost,BufEnter,CursorHold,FileType * call
|
||||
\ s:AutoUpdate(fnamemodify(expand('<afile>'), ':p'), 0)
|
||||
autocmd BufDelete,BufUnload,BufWipeout * call
|
||||
\ s:known_files.rm(fnamemodify(expand('<afile>'), ':p'))
|
||||
|
||||
Reference in New Issue
Block a user