From be86180c8834e033a33623e2fa3199837eb7d6fe Mon Sep 17 00:00:00 2001 From: Jan Larres Date: Mon, 28 Feb 2011 18:08:47 +1300 Subject: [PATCH] Small optimization --- plugin/tagbar.vim | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/plugin/tagbar.vim b/plugin/tagbar.vim index 666a2ca..7eba60c 100644 --- a/plugin/tagbar.vim +++ b/plugin/tagbar.vim @@ -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)