Safer syntastic#util#unique().

This commit is contained in:
LCD 47 2016-01-25 15:08:29 +02:00
parent d1a179d750
commit 972b87ca0d
2 changed files with 4 additions and 3 deletions

View File

@ -263,8 +263,9 @@ function! syntastic#util#unique(list) abort " {{{2
let seen = {}
let uniques = []
for e in a:list
if !has_key(seen, e)
let seen[e] = 1
let k = string(e)
if !has_key(seen, k)
let seen[k] = 1
call add(uniques, e)
endif
endfor

View File

@ -19,7 +19,7 @@ if has('reltime')
lockvar! g:_SYNTASTIC_START
endif
let g:_SYNTASTIC_VERSION = '3.7.0-76'
let g:_SYNTASTIC_VERSION = '3.7.0-77'
lockvar g:_SYNTASTIC_VERSION
" Sanity checks {{{1