diff --git a/autoload/SpaceVim/plugins/manager.vim b/autoload/SpaceVim/plugins/manager.vim index d817eae3f..6674cebcb 100644 --- a/autoload/SpaceVim/plugins/manager.vim +++ b/autoload/SpaceVim/plugins/manager.vim @@ -168,12 +168,13 @@ function! SpaceVim#plugins#manager#update(...) abort return endif let s:pct = 0 + let s:pct_done = 0 let s:plugins = a:0 == 0 ? sort(keys(dein#get())) : sort(copy(a:1)) if a:0 == 0 call add(s:plugins, 'SpaceVim') endif let s:total = len(s:plugins) - call s:set_buf_line(s:plugin_manager_buffer, 1, 'Updating plugins (' . s:pct . '/' . s:total . ')') + call s:set_buf_line(s:plugin_manager_buffer, 1, 'Updating plugins (' . s:pct_done . '/' . s:total . ')') if has('nvim') call s:set_buf_line(s:plugin_manager_buffer, 2, s:status_bar()) call s:set_buf_line(s:plugin_manager_buffer, 3, '') @@ -215,12 +216,13 @@ endfunction " here if a:data == 0, git pull succeed function! s:on_pull_exit(id, data, event) abort + let s:pct_done += 1 if a:data == 0 && a:event ==# 'exit' call s:msg_on_updated_done(s:pulling_repos[a:id].name) else call s:msg_on_updated_failed(s:pulling_repos[a:id].name) endif - call s:set_buf_line(s:plugin_manager_buffer, 1, 'Updating plugins (' . s:pct . '/' . s:total . ')') + call s:set_buf_line(s:plugin_manager_buffer, 1, 'Updating plugins (' . s:pct_done . '/' . s:total . ')') call s:set_buf_line(s:plugin_manager_buffer, 2, s:status_bar()) call remove(s:pulling_repos, string(a:id)) if !empty(s:plugins) @@ -260,7 +262,6 @@ endfunction function! s:lock_revision(repo) abort let cmd = ['git', '-C', a:repo.path, 'checkout', a:repo.rev] - let g:wsd = cmd call s:VIM_CO.system(cmd) endfunction