From 5566cb34d5cd96e53f2d932368db316af930b15d Mon Sep 17 00:00:00 2001 From: Jan Larres Date: Wed, 18 Sep 2013 17:44:52 +1200 Subject: [PATCH] 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(). --- autoload/tagbar.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/autoload/tagbar.vim b/autoload/tagbar.vim index d780a37..bd00d87 100644 --- a/autoload/tagbar.vim +++ b/autoload/tagbar.vim @@ -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(''), ':p'), 1) - autocmd BufEnter,CursorHold,FileType * call + autocmd BufReadPost,BufEnter,CursorHold,FileType * call \ s:AutoUpdate(fnamemodify(expand(''), ':p'), 0) autocmd BufDelete,BufUnload,BufWipeout * call \ s:known_files.rm(fnamemodify(expand(''), ':p'))