comparison vim/autoload/plug.vim @ 197:757b5e22e2ea

Update vim-plug
author zegervdv <zegervdv@me.com>
date Sat, 15 Nov 2014 09:33:03 +0100
parents e3639166a8ab
children e519bf689316
comparison
equal deleted inserted replaced
196:1665f80ff713 197:757b5e22e2ea
118 command! -nargs=? -bar PlugSnapshot call s:snapshot(<f-args>) 118 command! -nargs=? -bar PlugSnapshot call s:snapshot(<f-args>)
119 endfunction 119 endfunction
120 120
121 function! s:to_a(v) 121 function! s:to_a(v)
122 return type(a:v) == s:TYPE.list ? a:v : [a:v] 122 return type(a:v) == s:TYPE.list ? a:v : [a:v]
123 endfunction
124
125 function! s:to_s(v)
126 return type(a:v) == s:TYPE.string ? a:v : join(a:v, "\n") . "\n"
123 endfunction 127 endfunction
124 128
125 function! s:source(from, ...) 129 function! s:source(from, ...)
126 for pattern in a:000 130 for pattern in a:000
127 for vim in s:lines(globpath(a:from, pattern)) 131 for vim in s:lines(globpath(a:from, pattern))
770 let job.result = substitute(job.result, "Error[\r\n]$", '', '') 774 let job.result = substitute(job.result, "Error[\r\n]$", '', '')
771 endif 775 endif
772 call s:reap(name) 776 call s:reap(name)
773 call s:tick() 777 call s:tick()
774 else 778 else
775 let job.result .= v:job_data[2] 779 let job.result .= s:to_s(v:job_data[2])
776 " To reduce the number of buffer updates 780 " To reduce the number of buffer updates
777 let job.tick = get(job, 'tick', -1) + 1 781 let job.tick = get(job, 'tick', -1) + 1
778 if job.tick % len(s:jobs) == 0 782 if job.tick % len(s:jobs) == 0
779 call s:log(job.new ? '+' : '*', name, job.result) 783 call s:log(job.new ? '+' : '*', name, job.result)
780 endif 784 endif