mirror of
https://github.com/amix/vimrc
synced 2025-06-16 01:25:00 +08:00
Updated plugins
This commit is contained in:
@ -155,21 +155,12 @@ function! s:async_guru(args) abort
|
||||
endif
|
||||
endif
|
||||
|
||||
function! s:close_cb(chan) closure
|
||||
let messages = []
|
||||
while ch_status(a:chan, {'part': 'out'}) == 'buffered'
|
||||
let msg = ch_read(a:chan, {'part': 'out'})
|
||||
call add(messages, msg)
|
||||
endwhile
|
||||
|
||||
while ch_status(a:chan, {'part': 'err'}) == 'buffered'
|
||||
let msg = ch_read(a:chan, {'part': 'err'})
|
||||
call add(messages, msg)
|
||||
endwhile
|
||||
|
||||
let l:job = ch_getjob(a:chan)
|
||||
let l:info = job_info(l:job)
|
||||
let messages = []
|
||||
function! s:callback(chan, msg) closure
|
||||
call add(messages, a:msg)
|
||||
endfunction
|
||||
|
||||
function! s:exit_cb(job, exitval) closure
|
||||
let out = join(messages, "\n")
|
||||
|
||||
let status = {
|
||||
@ -178,21 +169,22 @@ function! s:async_guru(args) abort
|
||||
\ 'state': "finished",
|
||||
\ }
|
||||
|
||||
if l:info.exitval
|
||||
if a:exitval
|
||||
let status.state = "failed"
|
||||
endif
|
||||
|
||||
call go#statusline#Update(status_dir, status)
|
||||
|
||||
if has_key(a:args, 'custom_parse')
|
||||
call a:args.custom_parse(l:info.exitval, out)
|
||||
call a:args.custom_parse(a:exitval, out)
|
||||
else
|
||||
call s:parse_guru_output(l:info.exitval, out, a:args.mode)
|
||||
call s:parse_guru_output(a:exitval, out, a:args.mode)
|
||||
endif
|
||||
endfunction
|
||||
|
||||
let start_options = {
|
||||
\ 'close_cb': funcref("s:close_cb"),
|
||||
\ 'callback': funcref("s:callback"),
|
||||
\ 'exit_cb': funcref("s:exit_cb"),
|
||||
\ }
|
||||
|
||||
if has_key(result, 'stdin_content')
|
||||
|
Reference in New Issue
Block a user