mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-03-26 12:10:32 +08:00
fix(git): fix git branch info
This commit is contained in:
parent
0f623af900
commit
a6e14e1cfb
@ -91,7 +91,7 @@ function! s:git_branch() abort
|
|||||||
endtry
|
endtry
|
||||||
elseif exists('g:loaded_git')
|
elseif exists('g:loaded_git')
|
||||||
try
|
try
|
||||||
let head = '%{git#branch#current()}'
|
let head = git#branch#current()
|
||||||
if g:spacevim_statusline_unicode == 1
|
if g:spacevim_statusline_unicode == 1
|
||||||
return empty(head) ? '' : ' '.head . ' ' . s:gtm_status()
|
return empty(head) ? '' : ' '.head . ' ' . s:gtm_status()
|
||||||
else
|
else
|
||||||
|
@ -91,6 +91,9 @@ endfunction
|
|||||||
|
|
||||||
function! s:on_exit_show_branch(id, data, event) abort
|
function! s:on_exit_show_branch(id, data, event) abort
|
||||||
let pwd = get(s:job_pwds, 'jobid' . a:id, '')
|
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], {
|
call extend(s:branch_info[pwd], {
|
||||||
\ 'last_update_done' : localtime(),
|
\ 'last_update_done' : localtime(),
|
||||||
\ })
|
\ })
|
||||||
|
Loading…
x
Reference in New Issue
Block a user