diff --git a/autoload/tagbar.vim b/autoload/tagbar.vim index 0043349..4de9a62 100644 --- a/autoload/tagbar.vim +++ b/autoload/tagbar.vim @@ -1911,11 +1911,13 @@ function! s:ProcessFile(fname, ftype) abort let typeinfo = fileinfo.typeinfo call fileinfo.reset() else - silent! execute 'doautocmd TagbarProjects User ' . a:fname - if exists('b:tagbar_type') - let typeinfo = extend(copy(typeinfo), - \ s:TransformUserTypeDef(b:tagbar_type)) - call typeinfo.createKinddict() + if exists('#TagbarProjects#User') + execute 'doautocmd TagbarProjects User ' . a:fname + if exists('b:tagbar_type') + let typeinfo = extend(copy(typeinfo), + \ s:TransformUserTypeDef(b:tagbar_type)) + call typeinfo.createKinddict() + endif endif let fileinfo = s:FileInfo.New(a:fname, a:ftype, typeinfo) endif