@@ -474,9 +474,16 @@ function! s:start_cb(ch, json) abort
474
474
exe bufwinnr (oldbuf) ' wincmd w'
475
475
endfunction
476
476
477
- function ! s: starting (ch , msg) abort
477
+ function ! s: err_cb (ch , msg) abort
478
+ call go#util#EchoError (a: msg )
479
+ let s: state [' message' ] += [a: msg ]
480
+ endfunction
481
+
482
+ function ! s: out_cb (ch , msg) abort
478
483
call go#util#EchoProgress (a: msg )
479
484
let s: state [' message' ] += [a: msg ]
485
+
486
+ " TODO: why do this in this callback?
480
487
if stridx (a: msg , g: go_debug_address ) != -1
481
488
call ch_setoptions (a: ch , {
482
489
\ ' out_cb' : function (' s:logger' , [' OUT: ' ]),
@@ -563,8 +570,8 @@ function! go#debug#Start(is_test, ...) abort
563
570
call go#util#EchoProgress (' Starting GoDebug...' )
564
571
let s: state [' message' ] = []
565
572
let s: state [' job' ] = job_start (l: cmd , {
566
- \ ' out_cb' : function (' s:starting ' ),
567
- \ ' err_cb' : function (' s:starting ' ),
573
+ \ ' out_cb' : function (' s:out_cb ' ),
574
+ \ ' err_cb' : function (' s:err_cb ' ),
568
575
\ ' exit_cb' : function (' s:exit' ),
569
576
\ ' stoponexit' : ' kill' ,
570
577
\} )
0 commit comments