diff --git a/bundle/git.vim/autoload/git/branch.vim b/bundle/git.vim/autoload/git/branch.vim index a17626893..ec5ddba15 100644 --- a/bundle/git.vim/autoload/git/branch.vim +++ b/bundle/git.vim/autoload/git/branch.vim @@ -109,6 +109,10 @@ function! s:on_exit_show_branch(id, data, event) abort \ 'last_update_done' : localtime(), \ }) endif + " when the pwd is same as current directory, redraw statueline + if pwd == getcwd() + redrawstatus + endif endfunction "" " return the current branch info. this function can be used in statusline. diff --git a/bundle/git.vim/autoload/git/checkout.vim b/bundle/git.vim/autoload/git/checkout.vim index c4e1eef19..9af37c56a 100644 --- a/bundle/git.vim/autoload/git/checkout.vim +++ b/bundle/git.vim/autoload/git/checkout.vim @@ -1,4 +1,5 @@ let s:JOB = SpaceVim#api#import('job') +let s:NOTI = SpaceVim#api#import('notify') function! git#checkout#run(args) @@ -16,10 +17,10 @@ function! s:on_exit(id, data, event) abort call git#logger#debug('git-checkout exit data:' . string(a:data)) if a:data ==# 0 silent! checktime - echo 'checkout done' + call s:NOTI.notify('checkout done.') call git#branch#detect() else - echo 'failed!' + call s:NOTI.notify('checkout failed.', 'WarningMsg') endif endfunction