diff --git a/autoload/tagbar.vim b/autoload/tagbar.vim index f8afe5d..ec9ec6c 100644 --- a/autoload/tagbar.vim +++ b/autoload/tagbar.vim @@ -976,6 +976,9 @@ function! s:CreateAutocommands() abort autocmd BufDelete,BufUnload,BufWipeout * call \ s:known_files.rm(fnamemodify(expand(''), ':p')) + autocmd QuickFixCmdPre * let s:tagbar_qf_active = 1 + autocmd QuickFixCmdPost * unlet s:tagbar_qf_active + autocmd VimEnter * call s:CorrectFocusOnStartup() augroup END @@ -3185,6 +3188,12 @@ endfunction function! s:AutoUpdate(fname, force) abort call s:LogDebugMessage('AutoUpdate called [' . a:fname . ']') + " This file is being loaded due to a quickfix command like vimgrep, so + " don't process it + if exists('s:tagbar_qf_active') + return + endif + " Get the filetype of the file we're about to process let bufnr = bufnr(a:fname) let ftype = getbufvar(bufnr, '&filetype')