Use a list comprehension and try and catch some nasites
This commit is contained in:
parent
e216bc291d
commit
541686712c
2 changed files with 15 additions and 2 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue