mirror of
https://github.com/gryf/tagbar.git
synced 2025-12-17 11:30:28 +01:00
Small optimization
This commit is contained in:
@@ -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