commit 384c9e1d8ec25646396d53868ec0044e0b3ecbfc (tree)
parent 4a94b374d04dcca015d24b040baf1aee8022ed2b
Author: Tim Pope <code@tpope.net>
Date: Sun, 30 Jun 2019 21:11:31 -0400
Support :tcd in initialization
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/plugin/fugitive.vim b/plugin/fugitive.vim
@@ -159,7 +159,7 @@ function! FugitiveExtractGitDir(path) abort
endif
let root = resolve(path)
if root !=# path
- silent! exe haslocaldir() ? 'lcd .' : 'cd .'
+ silent! exe (haslocaldir() ? 'lcd' : exists(':tcd') && haslocaldir(-1) ? 'tcd' : 'cd') '.'
endif
let previous = ""
let env_git_dir = len($GIT_DIR) ? s:Slash(simplify(fnamemodify($GIT_DIR, ':p:s?[\/]$??'))) : ''