mirror of
https://github.com/junegunn/fzf.vim.git
synced 2025-12-10 06:21:54 +08:00
[fzf#vim#complete#word] Respect &dictionary option (#1373)
This commit is contained in:
@@ -47,8 +47,9 @@ else
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
function! fzf#vim#complete#word(...)
|
function! fzf#vim#complete#word(...)
|
||||||
|
let sources = empty(&dictionary) ? ['/usr/share/dict/words'] : split(&dictionary, ',')
|
||||||
return fzf#vim#complete(s:extend({
|
return fzf#vim#complete(s:extend({
|
||||||
\ 'source': 'cat /usr/share/dict/words'},
|
\ 'source': 'cat ' . join(map(sources, 'shellescape(v:val)'))},
|
||||||
\ get(a:000, 0, fzf#wrap())))
|
\ get(a:000, 0, fzf#wrap())))
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user