1
0
mirror of https://github.com/gryf/tagbar.git synced 2025-12-17 11:30:28 +01:00

Small optimization

This commit is contained in:
Jan Larres
2011-02-28 18:08:47 +13:00
parent 9eb5ff5e1f
commit be86180c88

View File

@@ -1034,12 +1034,10 @@ function! s:ProcessFile(fname, ftype)
if has_key(typeinfo, 'scopes') && !empty(typeinfo.scopes)
let scopedtags = []
for scope in typeinfo.scopes
let is_scoped = 'has_key(typeinfo.kind2scope, v:val.fields.kind) ||
\ has_key(v:val.fields, scope)'
let scopedtags += filter(copy(fileinfo.tags), is_scoped)
call filter(fileinfo.tags, '!(' . is_scoped . ')')
endfor
let is_scoped = 'has_key(typeinfo.kind2scope, v:val.fields.kind) ||
\ has_key(v:val, "scope")'
let scopedtags += filter(copy(fileinfo.tags), is_scoped)
call filter(fileinfo.tags, '!(' . is_scoped . ')')
let processedtags = []
call s:AddScopedTags(scopedtags, processedtags, '', '', 0, typeinfo)