summaryrefslogtreecommitdiff
path: root/plugin
diff options
context:
space:
mode:
authorMarco Hinz <mh.codebro@gmail.com>2015-04-10 22:18:46 +0200
committerMarco Hinz <mh.codebro@gmail.com>2015-04-10 22:18:46 +0200
commitc1adf0cd3df8b6ce4724678976eac6d87318c38d (patch)
tree3a31a2e8a2820661571b05776a8fd6e10aa0ed84 /plugin
parent622e69ff54f27363abc2ac18a5a69751f2b42f4a (diff)
downloadfzf-c1adf0cd3df8b6ce4724678976eac6d87318c38d.tar.gz
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.
Diffstat (limited to 'plugin')
-rw-r--r--plugin/fzf.vim6
1 files changed, 6 insertions, 0 deletions
diff --git a/plugin/fzf.vim b/plugin/fzf.vim
index 9a942a01..2b569204 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)