[Helptags] Fall back to s:uniq if uniq does not exist

Close #201
This commit is contained in:
Junegunn Choi 2016-09-22 11:01:42 +09:00
parent 0eb22e189d
commit 687f5e298f
No known key found for this signature in database
GPG key ID: 254BC280FEF9C627

View file

@ -812,7 +812,8 @@ function! s:helptag_sink(line)
endfunction
function! fzf#vim#helptags(...)
let tags = uniq(sort(split(globpath(&runtimepath, '**/doc/tags'), '\n')))
let sorted = sort(split(globpath(&runtimepath, '**/doc/tags'), '\n'))
let tags = exists('*uniq') ? uniq(sorted) : s:uniq(sorted)
return s:fzf('helptags', {
\ 'source': "grep -H '.*' ".join(map(tags, 'shellescape(v:val)')).