fix: set the block begin when the it's evaluated

This commit is contained in:
GreasySlug 2024-03-03 14:24:03 +09:00
parent d828801484
commit 87cb7c3af5

View file

@ -817,7 +817,10 @@ pub trait Runnable: Sized + Default + New {
continue;
}
match instance.eval(mem::take(&mut vm.codes)) {
Ok(out) if out.is_empty() => continue,
Ok(out) if out.is_empty() => {
instance.input().set_block_begin();
continue;
}
Ok(out) => {
output.write_all((out + "\n").as_bytes()).unwrap();
output.flush().unwrap();