Skip to content

Commit 31d1e15

Browse files
committed
Fix a slight inefficiency in xolox#easytags#highlight()
1 parent 0f57d4f commit 31d1e15

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

autoload/xolox/easytags.vim

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
" Vim script
22
" Author: Peter Odding <peter@peterodding.com>
3-
" Last Change: November 26, 2011
3+
" Last Change: January 6, 2012
44
" URL: http://peterodding.com/code/vim/easytags/
55

6-
let g:xolox#easytags#version = '2.7.5'
6+
let g:xolox#easytags#version = '2.7.6'
77

88
" Public interface through (automatic) commands. {{{1
99

@@ -272,6 +272,7 @@ function! s:find_tagged_files(entries, context) " {{{3
272272
endfunction
273273

274274
function! xolox#easytags#highlight() " {{{2
275+
" TODO This is a mess; Re-implement Python version in Vim script, benchmark, remove Python version.
275276
try
276277
" Treat C++ and Objective-C as plain C.
277278
let filetype = get(s:canonical_aliases, &ft, &ft)
@@ -313,8 +314,8 @@ function! xolox#easytags#highlight() " {{{2
313314
let matches = filter(copy(taglist), filter)
314315
if matches != []
315316
" Convert matched tags to :syntax command and execute it.
316-
call map(matches, 'xolox#misc#escape#pattern(get(v:val, "name"))')
317-
let pattern = tagkind.pattern_prefix . '\%(' . join(xolox#misc#list#unique(matches), '\|') . '\)' . tagkind.pattern_suffix
317+
let matches = map(xolox#misc#list#unique(matches), 'xolox#misc#escape#pattern(get(v:val, "name"))')
318+
let pattern = tagkind.pattern_prefix . '\%(' . join(matches, '\|') . '\)' . tagkind.pattern_suffix
318319
let template = 'syntax match %s /%s/ containedin=ALLBUT,%s'
319320
let command = printf(template, hlgroup_tagged, escape(pattern, '/'), xolox#misc#option#get('easytags_ignored_syntax_groups'))
320321
call xolox#misc#msg#debug("easytags.vim %s: Executing command '%s'.", g:xolox#easytags#version, command)

0 commit comments

Comments
 (0)