Check for existence of qf var before deleting

Otherwise explicit calling of QuickFixCmdPost autocmds without a
preceding QuickFixCmdPre will generate an error.
This commit is contained in:
Jan Larres 2013-11-06 13:27:16 +13:00
parent b60d08c468
commit 15f9ad6e88

View File

@ -979,7 +979,9 @@ function! s:CreateAutocommands() abort
\ s:known_files.rm(fnamemodify(expand('<afile>'), ':p'))
autocmd QuickFixCmdPre * let s:tagbar_qf_active = 1
autocmd QuickFixCmdPost * unlet s:tagbar_qf_active
autocmd QuickFixCmdPost * if exists('s:tagbar_qf_active') |
\ unlet s:tagbar_qf_active |
\ fi
autocmd VimEnter * call s:CorrectFocusOnStartup()
augroup END