Use :lcd when changing to VCS root
This commit is contained in:
parent
c758d2a79a
commit
26f2ffcdf4
|
@ -901,7 +901,7 @@ function! s:cd_to_vcs_root(path) abort
|
||||||
for vcs in [ '.git', '.hg', '.bzr', '.svn' ]
|
for vcs in [ '.git', '.hg', '.bzr', '.svn' ]
|
||||||
let root = finddir(vcs, dir .';')
|
let root = finddir(vcs, dir .';')
|
||||||
if !empty(root)
|
if !empty(root)
|
||||||
execute 'cd '. fnameescape(fnamemodify(root, ':h'))
|
execute 'lcd' fnameescape(fnamemodify(root, ':h'))
|
||||||
return 1
|
return 1
|
||||||
endif
|
endif
|
||||||
endfor
|
endfor
|
||||||
|
|
Loading…
Reference in a new issue