From c1adf0cd3df8b6ce4724678976eac6d87318c38d Mon Sep 17 00:00:00 2001 From: Marco Hinz Date: Fri, 10 Apr 2015 22:18:46 +0200 Subject: [PATCH] Check if :FZF is already executing Prior to this change, you'd get a longer error message if you did: :FZF :FZF The main problem being that `:file [FZF]` can be used only once. --- plugin/fzf.vim | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/plugin/fzf.vim b/plugin/fzf.vim index 9a942a0..2b56920 100644 --- a/plugin/fzf.vim +++ b/plugin/fzf.vim @@ -318,6 +318,12 @@ 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)