Move active check to fzf#run.

This commit is contained in:
Bryan Head 2015-04-11 12:27:50 -05:00
parent 797f42ecc6
commit 82bea6758a

View File

@ -98,6 +98,12 @@ function! s:upgrade(dict)
endfunction
function! fzf#run(...) abort
if has('nvim') && bufexists('[FZF]')
echohl WarningMsg
echomsg 'FZF is already running!'
echohl NONE
return []
endif
let dict = exists('a:1') ? s:upgrade(a:1) : {}
let temps = { 'result': tempname() }
let optstr = get(dict, 'options', '')
@ -325,12 +331,6 @@ function! s:cmd_callback(lines) abort
endfunction
function! s:cmd(bang, ...) abort
if bufexists('[FZF]')
echohl WarningMsg
echomsg 'FZF is already running!'
echohl NONE
return
endif
let args = copy(a:000)
if !s:legacy
let args = insert(args, '--expect=ctrl-t,ctrl-x,ctrl-v', 0)