[vim] Fix terminal buffer cleanup on Vim 8

Close #1172
This commit is contained in:
Junegunn Choi 2017-12-05 23:50:55 +09:00
parent 390b49653b
commit 5c34ab6692
No known key found for this signature in database
GPG Key ID: 254BC280FEF9C627

View File

@ -699,9 +699,9 @@ function! s:execute_term(dict, command, temps) abort
if has('nvim')
call termopen(command, fzf)
else
let t = term_start([&shell, &shellcmdflag, command], {'curwin': fzf.buf, 'exit_cb': function(fzf.on_exit)})
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(t, 20)
call term_wait(fzf.buf, 20)
endif
endif
finally