1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-23 20:20:05 +08:00
This commit is contained in:
Wang Shidong 2018-09-21 22:16:47 +08:00 committed by GitHub
parent 479e89e2f5
commit c4bbc664a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -90,6 +90,13 @@ endfunction
function! s:change_dir(dir) abort
call SpaceVim#logger#info('change to root:' . a:dir)
exe 'cd ' . fnameescape(fnamemodify(a:dir, ':p'))
try
" FIXME: change the git dir when the path is changed.
let b:git_dir = fugitive#extract_git_dir(expand('%:p'))
catch
endtry
" let &l:statusline = SpaceVim#layers#core#statusline#get(1)
endfunction
let s:BUFFER = SpaceVim#api#import('vim#buffer')