Update vim-plug

This commit is contained in:
crater2150 2018-07-25 14:13:45 +02:00
parent fd6621dbaf
commit 01089f54d1

View file

@ -799,7 +799,7 @@ function! s:bang(cmd, ...)
let cmd = a:0 ? s:with_cd(a:cmd, a:1) : a:cmd let cmd = a:0 ? s:with_cd(a:cmd, a:1) : a:cmd
if s:is_win if s:is_win
let batchfile = tempname().'.bat' let batchfile = tempname().'.bat'
call writefile(['@echo off', cmd], batchfile) call writefile(["@echo off\r", cmd . "\r"], batchfile)
let cmd = batchfile let cmd = batchfile
endif endif
let g:_plug_bang = (s:is_win && has('gui_running') ? 'silent ' : '').'!'.escape(cmd, '#!%') let g:_plug_bang = (s:is_win && has('gui_running') ? 'silent ' : '').'!'.escape(cmd, '#!%')
@ -908,7 +908,7 @@ function! s:finish(pull)
call add(msgs, "Press 'R' to retry.") call add(msgs, "Press 'R' to retry.")
endif endif
if a:pull && len(s:update.new) < len(filter(getline(5, '$'), if a:pull && len(s:update.new) < len(filter(getline(5, '$'),
\ "v:val =~ '^- ' && stridx(v:val, 'Already up-to-date') < 0")) \ "v:val =~ '^- ' && v:val !~# 'Already up.to.date'"))
call add(msgs, "Press 'D' to see the updated changes.") call add(msgs, "Press 'D' to see the updated changes.")
endif endif
echo join(msgs, ' ') echo join(msgs, ' ')
@ -1196,7 +1196,7 @@ function! s:spawn(name, cmd, opts)
let s:jobs[a:name] = job let s:jobs[a:name] = job
let cmd = has_key(a:opts, 'dir') ? s:with_cd(a:cmd, a:opts.dir) : a:cmd let cmd = has_key(a:opts, 'dir') ? s:with_cd(a:cmd, a:opts.dir) : a:cmd
if !empty(job.batchfile) if !empty(job.batchfile)
call writefile(['@echo off', cmd], job.batchfile) call writefile(["@echo off\r", cmd . "\r"], job.batchfile)
let cmd = job.batchfile let cmd = job.batchfile
endif endif
let argv = add(s:is_win ? ['cmd', '/c'] : ['sh', '-c'], cmd) let argv = add(s:is_win ? ['cmd', '/c'] : ['sh', '-c'], cmd)
@ -2023,7 +2023,7 @@ function! s:system(cmd, ...)
let cmd = a:0 > 0 ? s:with_cd(a:cmd, a:1) : a:cmd let cmd = a:0 > 0 ? s:with_cd(a:cmd, a:1) : a:cmd
if s:is_win if s:is_win
let batchfile = tempname().'.bat' let batchfile = tempname().'.bat'
call writefile(['@echo off', cmd], batchfile) call writefile(["@echo off\r", cmd . "\r"], batchfile)
let cmd = batchfile let cmd = batchfile
endif endif
return system(s:is_win ? '('.cmd.')' : cmd) return system(s:is_win ? '('.cmd.')' : cmd)
@ -2357,7 +2357,7 @@ function! s:preview_commit()
let cmd = 'cd '.s:shellesc(g:plugs[name].dir).' && git show --no-color --pretty=medium '.sha let cmd = 'cd '.s:shellesc(g:plugs[name].dir).' && git show --no-color --pretty=medium '.sha
if s:is_win if s:is_win
let batchfile = tempname().'.bat' let batchfile = tempname().'.bat'
call writefile(['@echo off', cmd], batchfile) call writefile(["@echo off\r", cmd . "\r"], batchfile)
let cmd = batchfile let cmd = batchfile
endif endif
execute 'silent %!' cmd execute 'silent %!' cmd