mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-08 11:33:47 -05:00
Use the neovim terminal emulator for :Git
This commit is contained in:
committed by
Tim Pope
parent
baa05dcfda
commit
4cc201cbe3
@@ -670,8 +670,17 @@ function! s:Git(bang, args) abort
|
||||
let git .= ' --no-pager'
|
||||
endif
|
||||
let args = matchstr(a:args,'\v\C.{-}%($|\\@<!%(\\\\)*\|)@=')
|
||||
call s:ExecuteInTree('!'.git.' '.args)
|
||||
call fugitive#reload_status()
|
||||
if exists(':terminal')
|
||||
let dir = s:repo().tree()
|
||||
tabnew
|
||||
execute 'lcd' fnameescape(dir)
|
||||
execute 'terminal' git args
|
||||
else
|
||||
call s:ExecuteInTree('!'.git.' '.args)
|
||||
if has('win32')
|
||||
call fugitive#reload_status()
|
||||
endif
|
||||
endif
|
||||
return matchstr(a:args, '\v\C\\@<!%(\\\\)*\|\zs.*')
|
||||
endfunction
|
||||
|
||||
@@ -708,6 +717,7 @@ augroup fugitive_status
|
||||
autocmd!
|
||||
if !has('win32')
|
||||
autocmd FocusGained,ShellCmdPost * call fugitive#reload_status()
|
||||
autocmd BufDelete term://* call fugitive#reload_status()
|
||||
endif
|
||||
augroup END
|
||||
|
||||
|
||||
Reference in New Issue
Block a user