Fix invisible input on Windows

This commit is contained in:
mo8it
2024-05-13 02:20:04 +02:00
parent 11fda5d70f
commit 0525739046
3 changed files with 24 additions and 37 deletions
+5 -8
View File
@@ -166,14 +166,11 @@ When you are done experimenting, enter `n` (or `next`) to move on to the next ex
self.render()
}
pub fn handle_invalid_cmd(&mut self, cmd: &str) -> io::Result<()> {
self.writer.write_all(b"Invalid command: ")?;
self.writer.write_all(cmd.as_bytes())?;
if cmd.len() > 1 {
self.writer
.write_all(b" (confusing input can occur after resizing the terminal)")?;
}
self.writer.write_all(b"\n")?;
pub fn handle_invalid_input(&mut self, input: char) -> io::Result<()> {
writeln!(
self.writer,
"Invalid input: {input} (confusing input can occur after resizing the terminal)",
)?;
self.show_prompt()
}
}