aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Odding <peter@peterodding.com>2014-07-09 21:42:51 +0200
committerPeter Odding <peter@peterodding.com>2014-07-09 21:42:51 +0200
commit0a64a812342956bacc00b54c216b54170d884a01 (patch)
treeb1c0a297ed0ccf4a5d9c49185c5fc49f7059e52b
parentb6f8757d004d5f4ef7280fd111a21821e6bee79a (diff)
downloadvim-easytags-0a64a812342956bacc00b54c216b54170d884a01.tar.gz
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
-rw-r--r--autoload/xolox/easytags.vim8
1 files changed, 4 insertions, 4 deletions
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