From 0a64a812342956bacc00b54c216b54170d884a01 Mon Sep 17 00:00:00 2001 From: Peter Odding Date: Wed, 9 Jul 2014 21:42:51 +0200 Subject: Deduplicate syntax keyword arguments This is a bug fix / improvement to the new syntax keyword usage introduced in b6f8757d004d5f4ef7280fd111a21821e6bee79a. Also relevant is issue #68 on GitHub, see https://github.com/xolox/vim-easytags/issues/68 --- autoload/xolox/easytags.vim | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'autoload') diff --git a/autoload/xolox/easytags.vim b/autoload/xolox/easytags.vim index 80abc49..8103324 100644 --- a/autoload/xolox/easytags.vim +++ b/autoload/xolox/easytags.vim @@ -3,7 +3,7 @@ " Last Change: July 9, 2014 " URL: http://peterodding.com/code/vim/easytags/ -let g:xolox#easytags#version = '3.6' +let g:xolox#easytags#version = '3.6.1' " Plug-in initialization. {{{1 @@ -322,15 +322,15 @@ function! xolox#easytags#highlight() " {{{2 " keyword command when 1) we can do so without sacrificing " accuracy or 2) the user explicitly chose to sacrifice " accuracy in order to make the highlighting faster. - let keywords = [] + let keywords = {} for tag in matches if s:is_keyword_compatible(tag) - call add(keywords, tag.name) + let keywords[tag.name] = 1 endif endfor if !empty(keywords) let template = 'syntax keyword %s %s containedin=ALLBUT,%s' - let command = printf(template, hlgroup_tagged, join(keywords), xolox#easytags#syntax_groups_to_ignore()) + let command = printf(template, hlgroup_tagged, join(keys(keywords)), xolox#easytags#syntax_groups_to_ignore()) call xolox#misc#msg#debug("easytags.vim %s: Executing command '%s'.", g:xolox#easytags#version, command) execute command " Remove the tags that we just highlighted from the list of -- cgit v1.2.3