summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2020-02-05 10:06:08 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2020-02-05 10:09:15 +0900
commit0896036266dc951ac03c451f1097171a996eb412 (patch)
treee6db424b4f6e7ca59ae9c124fc129478cb8ddf60
parent311b78ae82fc8b06f0eefbd54d6290f3a40d5e23 (diff)
[vim] Set &bufhidden=hide before starting terminal buffer
-rw-r--r--plugin/fzf.vim3
1 files changed, 3 insertions, 0 deletions
diff --git a/plugin/fzf.vim b/plugin/fzf.vim
index a646432b..e4c6e106 100644
--- a/plugin/fzf.vim
+++ b/plugin/fzf.vim
@@ -746,6 +746,9 @@ function! s:execute_term(dict, command, temps) abort
if has('nvim')
call termopen(command, fzf)
else
+ if !len(&bufhidden)
+ setlocal bufhidden=hide
+ endif
let fzf.buf = term_start([&shell, &shellcmdflag, command], {'curwin': 1, 'exit_cb': function(fzf.on_exit)})
if !has('patch-8.0.1261') && !has('nvim') && !s:is_win
call term_wait(fzf.buf, 20)