Skip to content

Commit 0a64a81

Browse files
committed
Deduplicate syntax keyword arguments
This is a bug fix / improvement to the new syntax keyword usage introduced in b6f8757. Also relevant is issue #68 on GitHub, see #68
1 parent b6f8757 commit 0a64a81

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

autoload/xolox/easytags.vim

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
" Last Change: July 9, 2014
44
" URL: http://peterodding.com/code/vim/easytags/
55

6-
let g:xolox#easytags#version = '3.6'
6+
let g:xolox#easytags#version = '3.6.1'
77

88
" Plug-in initialization. {{{1
99

@@ -322,15 +322,15 @@ function! xolox#easytags#highlight() " {{{2
322322
" keyword command when 1) we can do so without sacrificing
323323
" accuracy or 2) the user explicitly chose to sacrifice
324324
" accuracy in order to make the highlighting faster.
325-
let keywords = []
325+
let keywords = {}
326326
for tag in matches
327327
if s:is_keyword_compatible(tag)
328-
call add(keywords, tag.name)
328+
let keywords[tag.name] = 1
329329
endif
330330
endfor
331331
if !empty(keywords)
332332
let template = 'syntax keyword %s %s containedin=ALLBUT,%s'
333-
let command = printf(template, hlgroup_tagged, join(keywords), xolox#easytags#syntax_groups_to_ignore())
333+
let command = printf(template, hlgroup_tagged, join(keys(keywords)), xolox#easytags#syntax_groups_to_ignore())
334334
call xolox#misc#msg#debug("easytags.vim %s: Executing command '%s'.", g:xolox#easytags#version, command)
335335
execute command
336336
" Remove the tags that we just highlighted from the list of

0 commit comments

Comments
 (0)