aboutsummaryrefslogtreecommitdiffstats
path: root/autoload/xolox
diff options
context:
space:
mode:
authorPeter Odding <peter@peterodding.com>2012-01-06 00:22:34 +0100
committerPeter Odding <peter@peterodding.com>2012-01-06 00:22:34 +0100
commit31d1e15a94dcafc26b9ba98e42acc13fbf4d0b01 (patch)
tree19dc68e2f9431f784291ac8bed733fe5bc9f70e1 /autoload/xolox
parent0f57d4f9ba70fee2d17b322387f75cec551896c9 (diff)
downloadvim-easytags-31d1e15a94dcafc26b9ba98e42acc13fbf4d0b01.tar.gz
Fix a slight inefficiency in xolox#easytags#highlight()
Diffstat (limited to 'autoload/xolox')
-rw-r--r--autoload/xolox/easytags.vim9
1 files changed, 5 insertions, 4 deletions
diff --git a/autoload/xolox/easytags.vim b/autoload/xolox/easytags.vim
index 1b0fa23..7229a1c 100644
--- a/autoload/xolox/easytags.vim
+++ b/autoload/xolox/easytags.vim
@@ -1,9 +1,9 @@
" Vim script
" Author: Peter Odding <peter@peterodding.com>
-" Last Change: November 26, 2011
+" Last Change: January 6, 2012
" URL: http://peterodding.com/code/vim/easytags/
-let g:xolox#easytags#version = '2.7.5'
+let g:xolox#easytags#version = '2.7.6'
" Public interface through (automatic) commands. {{{1
@@ -272,6 +272,7 @@ function! s:find_tagged_files(entries, context) " {{{3
endfunction
function! xolox#easytags#highlight() " {{{2
+ " TODO This is a mess; Re-implement Python version in Vim script, benchmark, remove Python version.
try
" Treat C++ and Objective-C as plain C.
let filetype = get(s:canonical_aliases, &ft, &ft)
@@ -313,8 +314,8 @@ function! xolox#easytags#highlight() " {{{2
let matches = filter(copy(taglist), filter)
if matches != []
" Convert matched tags to :syntax command and execute it.
- call map(matches, 'xolox#misc#escape#pattern(get(v:val, "name"))')
- let pattern = tagkind.pattern_prefix . '\%(' . join(xolox#misc#list#unique(matches), '\|') . '\)' . tagkind.pattern_suffix
+ let matches = map(xolox#misc#list#unique(matches), 'xolox#misc#escape#pattern(get(v:val, "name"))')
+ let pattern = tagkind.pattern_prefix . '\%(' . join(matches, '\|') . '\)' . tagkind.pattern_suffix
let template = 'syntax match %s /%s/ containedin=ALLBUT,%s'
let command = printf(template, hlgroup_tagged, escape(pattern, '/'), xolox#misc#option#get('easytags_ignored_syntax_groups'))
call xolox#misc#msg#debug("easytags.vim %s: Executing command '%s'.", g:xolox#easytags#version, command)