mirror of
https://github.com/junegunn/fzf.vim.git
synced 2025-12-06 20:54:28 +08:00
[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:
committed by
Junegunn Choi
parent
7460b4382c
commit
2066643243
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user