Run auto-updating on BufReadPost event

If 'autoread' is set and a buffer gets updated, tagbar need to be
triggerd to update itself too.
This commit is contained in:
Techlive Zheng 2012-11-30 08:17:06 +08:00
parent 568ef5fd25
commit 17d199f584

View File

@ -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('<afile>'), ':p'), 1)
autocmd BufEnter,CursorHold,FileType * call
\ s:AutoUpdate(fnamemodify(expand('<afile>'), ':p'), 0)