mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-14 06:13:51 -05:00
Allow opting out of :terminal in Neovim
Closes https://github.com/tpope/vim-fugitive/issues/1051
This commit is contained in:
@@ -843,9 +843,9 @@ function! s:Git(bang, mods, args) abort
|
|||||||
let git .= ' --no-pager'
|
let git .= ' --no-pager'
|
||||||
endif
|
endif
|
||||||
let args = matchstr(a:args,'\v\C.{-}%($|\\@<!%(\\\\)*\|)@=')
|
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()
|
let dir = s:repo().tree()
|
||||||
if expand('%') != ''
|
if len(@%)
|
||||||
-tabedit %
|
-tabedit %
|
||||||
else
|
else
|
||||||
-tabnew
|
-tabnew
|
||||||
|
|||||||
Reference in New Issue
Block a user