mirror of
https://github.com/junegunn/fzf
synced 2024-11-02 21:40:34 +00:00
Check if :FZF is already executing
Prior to this change, you'd get a longer error message if you did: :FZF <esc> :FZF The main problem being that `:file [FZF]` can be used only once.
This commit is contained in:
parent
622e69ff54
commit
c1adf0cd3d
@ -318,6 +318,12 @@ function! s:cmd_callback(lines) abort
|
|||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:cmd(bang, ...) abort
|
function! s:cmd(bang, ...) abort
|
||||||
|
if bufexists('[FZF]')
|
||||||
|
echohl WarningMsg
|
||||||
|
echomsg 'FZF is already running!'
|
||||||
|
echohl NONE
|
||||||
|
return
|
||||||
|
endif
|
||||||
let args = copy(a:000)
|
let args = copy(a:000)
|
||||||
if !s:legacy
|
if !s:legacy
|
||||||
let args = insert(args, '--expect=ctrl-t,ctrl-x,ctrl-v', 0)
|
let args = insert(args, '--expect=ctrl-t,ctrl-x,ctrl-v', 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user