summaryrefslogtreecommitdiffstats
path: root/plugin
diff options
context:
space:
mode:
authorKassio Borges <kassioborgesm@gmail.com>2015-06-13 10:34:12 -0300
committerKassio Borges <kassioborgesm@gmail.com>2015-06-13 11:13:33 -0300
commit9f33068ab3d918651592c24f3fb1f9fddbaf226a (patch)
tree82f59d5d94b0933fe51b7c0a5791ff9873920d2a /plugin
parenteaa3c67a5e2b1e5f23d8fd3effc38d9cee9af521 (diff)
Avoid conflict with other neoterm plugins.
To avoid conflict with other neoterm plugins that manage terminals, prefer named terminals.
Diffstat (limited to 'plugin')
-rw-r--r--plugin/fzf.vim9
1 files changed, 2 insertions, 7 deletions
diff --git a/plugin/fzf.vim b/plugin/fzf.vim
index 89794d95..48ad606e 100644
--- a/plugin/fzf.vim
+++ b/plugin/fzf.vim
@@ -98,7 +98,7 @@ function! fzf#run(...) abort
try
let oshell = &shell
set shell=sh
- if has('nvim') && bufexists('[FZF]')
+ if has('nvim') && bufexists('term://*:FZF')
echohl WarningMsg
echomsg 'FZF is already running!'
echohl None
@@ -280,17 +280,13 @@ function! s:execute_term(dict, command, temps)
call s:split(a:dict)
call s:pushd(a:dict)
- let fzf = { 'buf': bufnr('%'), 'dict': a:dict, 'temps': a:temps }
+ let fzf = { 'buf': bufnr('%'), 'dict': a:dict, 'temps': a:temps, 'name': 'FZF' }
function! fzf.on_exit(id, code)
let tab = tabpagenr()
if bufnr('') == self.buf
" We use close instead of bd! since Vim does not close the split when
" there's no other listed buffer
close
- " FIXME This should be unnecessary due to `bufhidden=wipe` but in some
- " cases Neovim fails to clean up the buffer and `bufexists('[FZF]')
- " returns 1 even when it cannot be seen anywhere else. e.g. `FZF!`
- silent! execute 'bd!' self.buf
endif
if s:ptab == tab
wincmd p
@@ -305,7 +301,6 @@ function! s:execute_term(dict, command, temps)
endfunction
call termopen(a:command, fzf)
- silent file [FZF]
startinsert
return []
endfunction