Skip to content

Commit

Permalink
add new line before msg header
Browse files Browse the repository at this point in the history
  • Loading branch information
micheam committed Apr 3, 2020
1 parent 228f240 commit a8a349f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions autoload/gotest.vim
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,8 @@ fun! gotest#clear_result_buf() abort
call gotest#result_buf_execute('1,$d')
endfun

fun! gotest#write_result_buf(msg, ...) abort
let msg = a:msg->type() == v:t_list ? join(a:msg) : a:msg
let msg = a:0 >= 1 ? msg.' '.join(a:000) : msg
fun! gotest#write_result_buf(msglist = []) abort
let msg = a:msglist->join()
let bufrn = gotest#open_test_result_buf()
call appendbufline(bufrn, '$', msg)
call gotest#result_buf_execute('normal G')
Expand All @@ -122,14 +121,15 @@ fun! gotest#exec_test(target_func = v:null) abort
if gotest#vervose() == v:true
let cmd = cmd->add("-v")
endif
call gotest#write_result_buf()
call gotest#write_result_buf(
\ a:target_func != v:null ?
\ [pkg, a:target_func] : [pkg]
\)
let job = job_start(cmd, {
\ 'out_io': 'buffer',
\ 'callback': {_, msg ->
\ gotest#write_result_buf(">> ", msg)},
\ gotest#write_result_buf([">>", msg])},
\ })
endfun

Expand Down

0 comments on commit a8a349f

Please sign in to comment.