Use the neovim terminal emulator for :Git

This commit is contained in:
Ole Reifschneider
2015-03-28 16:11:07 +01:00
committed by Tim Pope
parent baa05dcfda
commit 4cc201cbe3

View File

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