Don't :cd if directory already correct
This commit is contained in:
parent
240127f5a5
commit
e6e3f3f225
@ -122,9 +122,11 @@ function! s:TreeChomp(...) abort
|
|||||||
try
|
try
|
||||||
if !empty(tree)
|
if !empty(tree)
|
||||||
if fugitive#GitVersion() =~# '^[01]\..*'
|
if fugitive#GitVersion() =~# '^[01]\..*'
|
||||||
let cd = exists('*haslocaldir') && haslocaldir() ? 'lcd' : 'cd'
|
if getcwd() !=# tree
|
||||||
let cwd = getcwd()
|
let cd = exists('*haslocaldir') && haslocaldir() ? 'lcd' : 'cd'
|
||||||
exe cd s:fnameescape(tree)
|
let cwd = getcwd()
|
||||||
|
exe cd s:fnameescape(tree)
|
||||||
|
endif
|
||||||
else
|
else
|
||||||
let args = ['-C', tree] + args
|
let args = ['-C', tree] + args
|
||||||
endif
|
endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user