mirror of
https://github.com/junegunn/vim-plug.git
synced 2024-12-23 20:45:31 -07:00
Code cleanup
This commit is contained in:
parent
385a1eb350
commit
15da7eb78a
12
plug.vim
12
plug.vim
@ -667,7 +667,7 @@ function! s:update_impl(pull, force, args) abort
|
|||||||
call mkdir(g:plug_home, 'p')
|
call mkdir(g:plug_home, 'p')
|
||||||
catch
|
catch
|
||||||
return s:err(printf('Invalid plug directory: %s.'
|
return s:err(printf('Invalid plug directory: %s.'
|
||||||
\ 'Try to call plug#begin with a valid directory', g:plug_home))
|
\ 'Try to call plug#begin with a valid directory', g:plug_home))
|
||||||
endtry
|
endtry
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@ -686,6 +686,7 @@ function! s:update_impl(pull, force, args) abort
|
|||||||
|
|
||||||
call s:prepare()
|
call s:prepare()
|
||||||
call append(0, ['', ''])
|
call append(0, ['', ''])
|
||||||
|
normal! 2G
|
||||||
|
|
||||||
if has('ruby') && s:update.threads > 1
|
if has('ruby') && s:update.threads > 1
|
||||||
try
|
try
|
||||||
@ -820,7 +821,6 @@ function! s:reap(name)
|
|||||||
call s:bar()
|
call s:bar()
|
||||||
|
|
||||||
call remove(s:jobs, a:name)
|
call remove(s:jobs, a:name)
|
||||||
return 1
|
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:bar()
|
function! s:bar()
|
||||||
@ -863,7 +863,6 @@ function! s:update_vim()
|
|||||||
let s:jobs_idx = {}
|
let s:jobs_idx = {}
|
||||||
|
|
||||||
call s:bar()
|
call s:bar()
|
||||||
normal! 2G
|
|
||||||
call s:tick()
|
call s:tick()
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
@ -908,11 +907,10 @@ while 1 " Without TCO, Vim stack is bound to explode
|
|||||||
|
|
||||||
if !s:jobs[name].running
|
if !s:jobs[name].running
|
||||||
call s:reap(name)
|
call s:reap(name)
|
||||||
continue
|
|
||||||
elseif len(s:jobs) < s:update.threads
|
|
||||||
continue
|
|
||||||
endif
|
endif
|
||||||
break
|
if len(s:jobs) >= s:update.threads
|
||||||
|
break
|
||||||
|
endif
|
||||||
endwhile
|
endwhile
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user