From 0896036266dc951ac03c451f1097171a996eb412 Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Wed, 5 Feb 2020 10:06:08 +0900 Subject: [PATCH] [vim] Set &bufhidden=hide before starting terminal buffer --- plugin/fzf.vim | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugin/fzf.vim b/plugin/fzf.vim index a646432..e4c6e10 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)