[fzf#vim#complete] append --no-expect to options

Reference: https://github.com/junegunn/fzf.vim/pull/436#discussion_r135379047
This commit is contained in:
Jan Edmund Lazo 2017-08-25 23:34:51 -04:00
parent b73cec55f0
commit 34ceec14d2

View file

@ -1255,9 +1255,10 @@ function! fzf#vim#complete(...)
call s:merge_opts(s:opts, remove(s:opts, 'extra_options'))
endif
if has_key(s:opts, 'options')
" FIXME: fzf currently doesn't have --no-expect option
if type(s:opts.options) == s:TYPE.string
let s:opts.options = substitute(s:opts.options, '--expect=[^ ]*', '', 'g')
if type(s:opts.options) == s:TYPE.list
call add(s:opts.options, '--no-expect')
else
let s:opts.options .= ' --no-expect'
endif
endif