From f3aad36f32aadd0ec217d5902e29ad7f7203ddd7 Mon Sep 17 00:00:00 2001 From: John Date: Thu, 26 Oct 2023 22:33:31 -0500 Subject: [PATCH] examples/interpret: Multi-line input support --- libconlang/examples/interpret.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libconlang/examples/interpret.rs b/libconlang/examples/interpret.rs index 6951ac5..e34a464 100644 --- a/libconlang/examples/interpret.rs +++ b/libconlang/examples/interpret.rs @@ -43,11 +43,11 @@ fn take_stdin() -> Result<(), Box> { } 1 => { let _ = run(&buf, &mut interpreter).map_err(|e| eprintln!("{e}")); + print!("\n{PROMPT}"); buf.clear(); } - _ => (), + _ => print!(". "), } - print!("{PROMPT}"); stdout().flush()?; } } else {