Make :Git open a tab to the left for :terminal

- Users of multiple tabs will find themselves back where they started
  when the terminal closes, instead of in the next tab over
This commit is contained in:
Quinn Strahl 2016-04-14 18:54:18 -04:00 committed by Tim Pope
parent 0ac4915cd7
commit bdd216827a

View File

@ -704,7 +704,7 @@ function! s:Git(bang, args) abort
let args = matchstr(a:args,'\v\C.{-}%($|\\@<!%(\\\\)*\|)@=')
if exists(':terminal')
let dir = s:repo().tree()
tabedit %
-tabedit %
execute 'lcd' fnameescape(dir)
execute 'terminal' git args
else