mirror of
https://github.com/gryf/tagbar.git
synced 2026-10-06 05:20:41 +02:00
Small optimization
This commit is contained in:
1 parent
9eb5ff5e1f
commit
be86180c88
1 file changed
+4
-6
+4
-6
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user