From 17d199f584a51e6d032bc97f265e75a1e1f9d1e8 Mon Sep 17 00:00:00 2001 From: Techlive Zheng Date: Fri, 30 Nov 2012 08:17:06 +0800 Subject: [PATCH] Run auto-updating on BufReadPost event If 'autoread' is set and a buffer gets updated, tagbar need to be triggerd to update itself too. --- autoload/tagbar.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoload/tagbar.vim b/autoload/tagbar.vim index e9e8e93..84bd4e4 100644 --- a/autoload/tagbar.vim +++ b/autoload/tagbar.vim @@ -960,7 +960,7 @@ function! s:CreateAutocommands() abort autocmd BufEnter __Tagbar__ nested call s:QuitIfOnlyWindow() autocmd CursorHold __Tagbar__ call s:ShowPrototype(1) - autocmd BufWritePost * call + autocmd BufReadPost,BufWritePost * call \ s:AutoUpdate(fnamemodify(expand(''), ':p'), 1) autocmd BufEnter,CursorHold,FileType * call \ s:AutoUpdate(fnamemodify(expand(''), ':p'), 0)