Allow opting out of :terminal in Neovim

Closes https://github.com/tpope/vim-fugitive/issues/1051
This commit is contained in:
Tim Pope
2018-07-13 15:14:09 -04:00
parent 302f30c924
commit 6f07b18012

View File

@@ -843,9 +843,9 @@ function! s:Git(bang, mods, args) abort
let git .= ' --no-pager'
endif
let args = matchstr(a:args,'\v\C.{-}%($|\\@<!%(\\\\)*\|)@=')
if exists(':terminal') && has('nvim')
if exists(':terminal') && has('nvim') && !get(g:, 'fugitive_force_bang_command')
let dir = s:repo().tree()
if expand('%') != ''
if len(@%)
-tabedit %
else
-tabnew