mirror of
https://github.com/junegunn/fzf.vim.git
synced 2026-01-09 21:12:32 +08:00
Concatenate options for customization (#15)
This commit is contained in:
@@ -54,7 +54,11 @@ function! s:buflisted()
|
||||
endfunction
|
||||
|
||||
function! s:fzf(opts, extra)
|
||||
return fzf#run(extend(a:opts, get(a:extra, 0, {})))
|
||||
let extra = copy(get(a:extra, 0, {}))
|
||||
let eopts = has_key(extra, 'options') ? remove(extra, 'options') : ''
|
||||
let merged = extend(copy(a:opts), extra)
|
||||
let merged.options = join(filter([get(merged, 'options', ''), eopts], '!empty(v:val)'))
|
||||
return fzf#run(merged)
|
||||
endfunction
|
||||
|
||||
let s:default_action = {
|
||||
@@ -783,4 +787,3 @@ endfunction
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user