1
0
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:
Jan Larres
2013-09-18 17:44:52 +12:00
parent 97d7b04bdd
commit 5566cb34d5

View File

@@ -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'))