From 6d2b10022e19b76c49dff479be47026c99f08d28 Mon Sep 17 00:00:00 2001 From: Carson McManus Date: Sun, 29 Aug 2021 20:36:51 -0400 Subject: [PATCH] flush output before waiting for input in prompt_char_impl, fixes #103 --- src/tui.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/tui.rs b/src/tui.rs index 4ed82c9..d7ee380 100644 --- a/src/tui.rs +++ b/src/tui.rs @@ -81,6 +81,7 @@ fn prompt_char_impl(input: &mut impl Read, text: &str, chars: &str) -> char { loop { print!("{} [{}] ", text, chars); + let _ = std::io::stdout().flush(); let answer = input .read_line() .expect("Unable to read input")