1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-03-13 02:05:40 +08:00

fix(branch): fix on_exit_show_branch function

This commit is contained in:
wsdjeg 2022-04-22 21:08:40 +08:00
parent 4ebcd961c7
commit accc7b8dcd

View File

@ -93,12 +93,14 @@ 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)
if !has_key(s:branch_info, pwd) && !empty(pwd)
let s:branch_info[pwd] = {}
endif
call extend(s:branch_info[pwd], {
\ 'last_update_done' : localtime(),
\ })
if !empty(pwd)
call extend(s:branch_info[pwd], {
\ 'last_update_done' : localtime(),
\ })
endif
endfunction
function! git#branch#current(...) abort