diff --git a/autoload/tagbar.vim b/autoload/tagbar.vim index dc084df..d0009f1 100644 --- a/autoload/tagbar.vim +++ b/autoload/tagbar.vim @@ -2357,7 +2357,6 @@ function! s:PrintKinds(typeinfo, fileinfo) " Print 'kind' header of following children if !has_key(a:typeinfo.kind2scope, ckind.short) silent put =' [' . ckind.long . ']' - let a:fileinfo.tline[line('.')] = tag endif for childtag in childtags call s:PrintTag(childtag, 1, @@ -2433,11 +2432,12 @@ function! s:PrintTag(tag, depth, fileinfo, typeinfo) let childtags = filter(copy(a:tag.children), \ 'v:val.fields.kind ==# ckind.short') if len(childtags) > 0 - " Print 'kind' header of following children + " Print 'kind' header of following children, but only if they + " are not scope-defining tags (since those already have an + " identifier) if !has_key(a:typeinfo.kind2scope, ckind.short) silent put =' ' . repeat(' ', a:depth * 2) . \ '[' . ckind.long . ']' - let a:fileinfo.tline[line('.')] = a:tag endif for childtag in childtags call s:PrintTag(childtag, a:depth + 1,