Avoid shell with nvim terminal

This commit is contained in:
Tim Pope
2021-08-11 13:17:19 -04:00
parent 0b53a4daff
commit b709d9f782

View File

@@ -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