diff options
| author | Daniel Hahler <github@thequod.de> | 2017-03-27 06:41:39 +0200 |
|---|---|---|
| committer | Junegunn Choi <junegunn.c@gmail.com> | 2017-03-27 13:41:39 +0900 |
| commit | d295d20dc4f0374d08ab251732c4052e6de43ce8 (patch) | |
| tree | 5b0957a187a994417ca546a84d445a79a32a85d5 /plugin | |
| parent | 2ba10071c96334f3241c39cff5682bc2256badda (diff) | |
| download | fzf-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')
| -rw-r--r-- | plugin/fzf.vim | 9 |
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() } |
