mirror of
https://github.com/airblade/vim-gitgutter.git
synced 2025-11-08 11:33:48 -05:00
Use built-in uniq() when available.
This commit is contained in:
@@ -98,12 +98,18 @@ function! s:clear(bufnr)
|
|||||||
call s:reset_tick(a:bufnr)
|
call s:reset_tick(a:bufnr)
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:uniq(list)
|
if exists('*uniq') " Vim 7.4.218
|
||||||
let processed = []
|
function! s:uniq(list)
|
||||||
for e in a:list
|
return uniq(sort(a:list))
|
||||||
if index(processed, e) == -1
|
endfunction
|
||||||
call add(processed, e)
|
else
|
||||||
endif
|
function! s:uniq(list)
|
||||||
endfor
|
let processed = []
|
||||||
return processed
|
for e in a:list
|
||||||
endfunction
|
if index(processed, e) == -1
|
||||||
|
call add(processed, e)
|
||||||
|
endif
|
||||||
|
endfor
|
||||||
|
return processed
|
||||||
|
endfunction
|
||||||
|
endif
|
||||||
|
|||||||
Reference in New Issue
Block a user