From 5027e18ae2c13369adbc5c34dbd7652b3d4cc558 Mon Sep 17 00:00:00 2001 From: Richard Randall Date: Tue, 25 Jan 2022 20:13:52 +0000 Subject: [PATCH] Append final newline in read_line_initial_text --- src/term.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/term.rs b/src/term.rs index 13c9bf0e..08bda30a 100644 --- a/src/term.rs +++ b/src/term.rs @@ -320,7 +320,10 @@ impl Term { self.write_str(chr.encode_utf8(&mut bytes_char))?; self.flush()?; } - Key::Enter => break, + Key::Enter => { + self.write_line("")?; + break; + } Key::Unknown => { return Err(io::Error::new( io::ErrorKind::NotConnected,