update plug
This commit is contained in:
parent
5a433c5339
commit
206ec87a39
@ -61,7 +61,7 @@
|
||||
" More information: https://github.com/junegunn/vim-plug
|
||||
"
|
||||
"
|
||||
" Copyright (c) 2016 Junegunn Choi
|
||||
" Copyright (c) 2017 Junegunn Choi
|
||||
"
|
||||
" MIT License
|
||||
"
|
||||
@ -426,7 +426,10 @@ function! s:dobufread(names)
|
||||
let path = s:rtp(g:plugs[name]).'/**'
|
||||
for dir in ['ftdetect', 'ftplugin']
|
||||
if len(finddir(dir, path))
|
||||
return s:doautocmd('BufRead')
|
||||
if exists('#BufRead')
|
||||
doautocmd BufRead
|
||||
endif
|
||||
return
|
||||
endif
|
||||
endfor
|
||||
endfor
|
||||
@ -919,7 +922,8 @@ function! s:check_ruby()
|
||||
endfunction
|
||||
|
||||
function! s:update_impl(pull, force, args) abort
|
||||
let args = copy(a:args)
|
||||
let sync = index(a:args, '--sync') >= 0 || has('vim_starting')
|
||||
let args = filter(copy(a:args), 'v:val != "--sync"')
|
||||
let threads = (len(args) > 0 && args[-1] =~ '^[1-9][0-9]*$') ?
|
||||
\ remove(args, -1) : get(g:, 'plug_threads', 16)
|
||||
|
||||
@ -1020,7 +1024,7 @@ function! s:update_impl(pull, force, args) abort
|
||||
endtry
|
||||
else
|
||||
call s:update_vim()
|
||||
while use_job && has('vim_starting')
|
||||
while use_job && sync
|
||||
sleep 100m
|
||||
if s:update.fin
|
||||
break
|
||||
@ -1181,7 +1185,7 @@ function! s:spawn(name, cmd, opts)
|
||||
\ 'Invalid arguments (or job table is full)']
|
||||
endif
|
||||
elseif s:vim8
|
||||
let jid = job_start(argv, {
|
||||
let jid = job_start(s:is_win ? join(argv, ' ') : argv, {
|
||||
\ 'out_cb': function('s:job_cb', ['s:job_out_cb', job]),
|
||||
\ 'exit_cb': function('s:job_cb', ['s:job_exit_cb', job]),
|
||||
\ 'out_mode': 'raw'
|
||||
@ -2288,7 +2292,12 @@ function! s:preview_commit()
|
||||
wincmd P
|
||||
endif
|
||||
setlocal previewwindow filetype=git buftype=nofile nobuflisted modifiable
|
||||
execute 'silent %!cd' s:shellesc(g:plugs[name].dir) '&& git show --no-color --pretty=medium' sha
|
||||
try
|
||||
let [sh, shrd] = s:chsh(1)
|
||||
execute 'silent %!cd' s:shellesc(g:plugs[name].dir) '&& git show --no-color --pretty=medium' sha
|
||||
finally
|
||||
let [&shell, &shellredir] = [sh, shrd]
|
||||
endtry
|
||||
setlocal nomodifiable
|
||||
nnoremap <silent> <buffer> q :q<cr>
|
||||
wincmd p
|
||||
|
Loading…
Reference in New Issue
Block a user