From e089b61e257c39c1cf5a90cf945a062839b1dca1 Mon Sep 17 00:00:00 2001 From: Jan Larres Date: Sat, 18 Feb 2017 16:32:30 +1300 Subject: [PATCH] Don't error on incorrect ctags scope info, ref #397 --- autoload/tagbar.vim | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/autoload/tagbar.vim b/autoload/tagbar.vim index 2d54fc3..5177f28 100644 --- a/autoload/tagbar.vim +++ b/autoload/tagbar.vim @@ -2706,7 +2706,9 @@ endfunction function! s:create_pseudotag(name, parent, kind, typeinfo, fileinfo) abort if !empty(a:parent) let curpath = a:parent.fullpath - let pscope = a:typeinfo.kind2scope[a:parent.fields.kind] + " If the kind is not present in the kind2scope dictionary, return an + " empty scope. This can happen due to incorrect ctags output as in #397. + let pscope = get(a:typeinfo.kind2scope, a:parent.fields.kind, '') else let curpath = '' let pscope = ''