Handle non-existent project autocmds properly, closes #145

This commit is contained in:
Jan Larres 2013-05-06 18:49:19 +12:00
parent f5435678fb
commit 24915dbe24

View File

@ -1911,11 +1911,13 @@ function! s:ProcessFile(fname, ftype) abort
let typeinfo = fileinfo.typeinfo
call fileinfo.reset()
else
silent! execute 'doautocmd <nomodeline> 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 <nomodeline> 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