summaryrefslogtreecommitdiff
path: root/plugin/fzf.vim
diff options
context:
space:
mode:
authorDaniel Hahler <github@thequod.de>2017-03-27 06:41:39 +0200
committerJunegunn Choi <junegunn.c@gmail.com>2017-03-27 13:41:39 +0900
commitd295d20dc4f0374d08ab251732c4052e6de43ce8 (patch)
tree5b0957a187a994417ca546a84d445a79a32a85d5 /plugin/fzf.vim
parent2ba10071c96334f3241c39cff5682bc2256badda (diff)
downloadfzf-d295d20dc4f0374d08ab251732c4052e6de43ce8.tar.gz
fzf#run: improve "is already running" message (#885)
This displays the buffer(s) in this case, which is useful when FZF got stuck, and you have to manually remove the buffer.
Diffstat (limited to 'plugin/fzf.vim')
-rw-r--r--plugin/fzf.vim9
1 files changed, 6 insertions, 3 deletions
diff --git a/plugin/fzf.vim b/plugin/fzf.vim
index 8e7c04ac..820ca562 100644
--- a/plugin/fzf.vim
+++ b/plugin/fzf.vim
@@ -287,9 +287,12 @@ try
set shell=sh
endif
- if has('nvim') && len(filter(range(1, bufnr('$')), 'bufname(v:val) =~# ";#FZF"'))
- call s:warn('FZF is already running!')
- return []
+ if has('nvim')
+ let running = filter(range(1, bufnr('$')), "bufname(v:val) =~# ';#FZF'")
+ if len(running)
+ call s:warn('FZF is already running (in buffer '.join(running, ', ').')!')
+ return []
+ endif
endif
let dict = exists('a:1') ? s:upgrade(a:1) : {}
let temps = { 'result': tempname() }