summaryrefslogtreecommitdiffstats
path: root/plugin
diff options
context:
space:
mode:
authorKassio Borges <kassioborgesm@gmail.com>2016-07-28 14:03:27 +0100
committerKassio Borges <kassioborgesm@gmail.com>2016-07-29 11:10:46 +0100
commit27444d6b1e17112e9241e85db07154f10d79cef8 (patch)
tree38bf1ad75d39f9f1e5aa3d6471b2507662ff7645 /plugin
parentd6a99c0391b3859c5db9a0072b366caaf3278f18 (diff)
Remove `name` option from `termopen`.
`termopen` no longer accepts a `name` option, instead we should suffix the command with `;#NAME`.
Diffstat (limited to 'plugin')
-rw-r--r--plugin/fzf.vim7
1 files changed, 3 insertions, 4 deletions
diff --git a/plugin/fzf.vim b/plugin/fzf.vim
index 1dc29dc4..bf65cd0a 100644
--- a/plugin/fzf.vim
+++ b/plugin/fzf.vim
@@ -204,7 +204,7 @@ function! fzf#run(...) abort
try
let oshell = &shell
set shell=sh
- if has('nvim') && bufexists('term://*:FZF')
+ if has('nvim') && len(filter(range(1, bufnr('$')), 'bufname(v:val) =~# ";#FZF"'))
call s:warn('FZF is already running!')
return []
endif
@@ -424,7 +424,7 @@ endfunction
function! s:execute_term(dict, command, temps) abort
let [ppos, winopts] = s:split(a:dict)
let fzf = { 'buf': bufnr('%'), 'ppos': ppos, 'dict': a:dict, 'temps': a:temps,
- \ 'name': 'FZF', 'winopts': winopts, 'command': a:command }
+ \ 'winopts': winopts, 'command': a:command }
function! fzf.switch_back(inplace)
if a:inplace && bufnr('') == self.buf
" FIXME: Can't re-enter normal mode from terminal mode
@@ -466,7 +466,7 @@ function! s:execute_term(dict, command, temps) abort
if s:present(a:dict, 'dir')
execute 'lcd' s:escape(a:dict.dir)
endif
- call termopen(a:command, fzf)
+ call termopen(a:command . ';#FZF', fzf)
finally
if s:present(a:dict, 'dir')
lcd -
@@ -550,4 +550,3 @@ command! -nargs=* -complete=dir -bang FZF call s:cmd(<bang>0, <f-args>)
let &cpo = s:cpo_save
unlet s:cpo_save
-