commit b709d9f782813565be57344538129cf00ea71463 (tree)
parent 0b53a4daff49fa8b9269509ee3e577a964da9751
Author: Tim Pope <code@tpope.net>
Date: Wed, 11 Aug 2021 13:17:19 -0400
Avoid shell with nvim terminal
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim
@@ -3203,7 +3203,7 @@ function! fugitive#Command(line1, line2, range, bang, mods, arg) abort
let assign = len(dir) ? '|let b:git_dir = ' . string(dir) : ''
if has('nvim')
call fugitive#Autowrite()
- return mods . (a:line2 ? 'split' : 'edit') . ' term://' . s:fnameescape(s:UserCommand(options, args)) . assign . '|startinsert' . after
+ return mods . (a:line2 ? 'new' : 'enew') . '|call termopen(' . string(s:UserCommandList(options) + args) . ')' . assign . '|startinsert' . after
elseif has('terminal')
call fugitive#Autowrite()
return 'exe ' . string(mods . 'terminal ' . (a:line2 ? '' : '++curwin ') . join(map(s:UserCommandList(options) + args, 's:fnameescape(v:val)'))) . assign . after