[fzf#vim#colors] Remove duplicate colorschemes (#278)
Use s:uniq() instead of uniq() for older versions of Vim. We don't sort the list before passing it to s:uniq() because 1. s:uniq() can process unsorted lists. 2. And in that way, we can list color schemes from plugins before the default ones provided by Vim.
This commit is contained in:
parent
7460b4382c
commit
2066643243
1 changed files with 2 additions and 2 deletions
|
@ -358,8 +358,8 @@ endfunction
|
|||
" ------------------------------------------------------------------
|
||||
function! fzf#vim#colors(...)
|
||||
return s:fzf('colors', {
|
||||
\ 'source': map(split(globpath(&rtp, "colors/*.vim"), "\n"),
|
||||
\ "substitute(fnamemodify(v:val, ':t'), '\\..\\{-}$', '', '')"),
|
||||
\ 'source': s:uniq(map(split(globpath(&rtp, "colors/*.vim"), "\n"),
|
||||
\ "substitute(fnamemodify(v:val, ':t'), '\\..\\{-}$', '', '')")),
|
||||
\ 'sink': 'colo',
|
||||
\ 'options': '+m --prompt="Colors> "'
|
||||
\}, a:000)
|
||||
|
|
Loading…
Add table
Reference in a new issue