mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-01-23 23:10:04 +08:00
fix(runner): fix code runner
close https://github.com/SpaceVim/SpaceVim/issues/4625
This commit is contained in:
parent
0700fc2622
commit
918623d31f
@ -287,10 +287,12 @@ function! s:on_stdout(job_id, data, event) abort
|
|||||||
if bufexists(s:code_runner_bufnr)
|
if bufexists(s:code_runner_bufnr)
|
||||||
if s:SYS.isWindows
|
if s:SYS.isWindows
|
||||||
let data = map(a:data, 'substitute(v:val, "\r$", "", "g")')
|
let data = map(a:data, 'substitute(v:val, "\r$", "", "g")')
|
||||||
|
else
|
||||||
|
let data = a:data
|
||||||
endif
|
endif
|
||||||
call s:BUFFER.buf_set_lines(s:code_runner_bufnr, s:runner_lines , s:runner_lines + 1, 0, data)
|
call s:BUFFER.buf_set_lines(s:code_runner_bufnr, s:runner_lines , s:runner_lines + 1, 0, data)
|
||||||
endif
|
endif
|
||||||
let s:runner_lines += len(a:data)
|
let s:runner_lines += len(data)
|
||||||
if s:winid >= 0
|
if s:winid >= 0
|
||||||
call s:VIM.win_set_cursor(s:winid, [s:VIM.buf_line_count(s:code_runner_bufnr), 1])
|
call s:VIM.win_set_cursor(s:winid, [s:VIM.buf_line_count(s:code_runner_bufnr), 1])
|
||||||
endif
|
endif
|
||||||
|
Loading…
Reference in New Issue
Block a user