Use a list comprehension and try and catch some nasites

This commit is contained in:
Ben Jackson 2019-02-26 15:24:07 +00:00
commit 541686712c
2 changed files with 15 additions and 2 deletions

View file

@ -138,12 +138,16 @@ function! vimspector#internal#job#StartCommandWithLog( cmd, category )
\ 'stoponexit': 'kill'
\ } ) )
if job_status( s:commands[ a:category ][ index ] ) !=# 'run'
echom "Unable to start job for " . a:cmd
return v:none
endif
let l:stdout = ch_getbufnr(
\ job_getchannel( s:commands[ a:category ][ index ] ), 'out' )
let l:stderr = ch_getbufnr(
\ job_getchannel( s:commands[ a:category ][ index ] ), 'err' )
return [ l:stdout, l:stderr ]
endfunction