1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

vrepl: fix output errors (fix #15801) (#15804)

This commit is contained in:
yuyi
2022-09-18 19:09:31 +08:00
committed by GitHub
parent d67aa8d76c
commit c78344ef04
2 changed files with 18 additions and 1 deletions

View File

@ -494,7 +494,9 @@ fn run_repl(workdir string, vrepl_prefix string) int {
}
if s.output.len > r.last_output.len {
len := r.last_output.len
r.last_output = s.output.clone()
if s.exit_code == 0 {
r.last_output = s.output.clone()
}
cur_line_output := s.output[len..]
print_output(cur_line_output)
}