1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-23 17:40:06 +08:00

fix(git): fix git branch info

This commit is contained in:
wsdjeg 2022-04-15 23:56:31 +08:00
parent 0f623af900
commit a6e14e1cfb
2 changed files with 4 additions and 1 deletions

View File

@ -91,7 +91,7 @@ function! s:git_branch() abort
endtry
elseif exists('g:loaded_git')
try
let head = '%{git#branch#current()}'
let head = git#branch#current()
if g:spacevim_statusline_unicode == 1
return empty(head) ? '' : '  '.head . ' ' . s:gtm_status()
else

View File

@ -91,6 +91,9 @@ endfunction
function! s:on_exit_show_branch(id, data, event) abort
let pwd = get(s:job_pwds, 'jobid' . a:id, '')
if !has_key(s:branch_info, pwd)
let s:branch_info[pwd] = {}
endif
call extend(s:branch_info[pwd], {
\ 'last_update_done' : localtime(),
\ })