async: include stderr output in job output (Nvim)

references #1551
This commit is contained in:
Christian Brabandt 2017-08-29 12:56:15 +02:00
parent d3f8873469
commit 942458f19b
No known key found for this signature in database
GPG Key ID: F3F92DA383FDDE09
1 changed files with 3 additions and 4 deletions

View File

@ -154,7 +154,7 @@ elseif has("nvim")
endfunction
function! s:nvim_mq_job_handler(job_id, data, event) dict
if a:event == 'stdout'
if a:event == 'stdout' || a:event == 'stderr'
let self.buf .= join(a:data)
else " on_exit handler
call s:mq_output(self.buf, self.file)
@ -162,9 +162,7 @@ elseif has("nvim")
endfunction
function! s:nvim_po_job_handler(job_id, data, event) dict
if a:event == 'stdout'
let self.buf .= join(a:data)
elseif a:event == 'stderr'
if a:event == 'stdout' || a:event == 'stderr'
let self.buf .= join(a:data)
else " on_exit handler
call s:po_output(self.buf, self.file)
@ -178,6 +176,7 @@ elseif has("nvim")
\ 'file': a:file,
\ 'cwd': s:valid_dir(fnamemodify(a:file, ':p:h')),
\ 'on_stdout': function('s:nvim_mq_job_handler'),
\ 'on_stderr': function('s:nvim_mq_job_handler'),
\ 'on_exit': function('s:nvim_mq_job_handler')
\ }
if g:airline#init#is_windows && &shell =~ 'cmd'