Skip to content

Commit 5484ea9

Browse files
authored
Merge pull request #113 from RichRandall/master
Append final newline in read_line_initial_text
2 parents be1c287 + 5027e18 commit 5484ea9

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/term.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,10 @@ impl Term {
320320
self.write_str(chr.encode_utf8(&mut bytes_char))?;
321321
self.flush()?;
322322
}
323-
Key::Enter => break,
323+
Key::Enter => {
324+
self.write_line("")?;
325+
break;
326+
}
324327
Key::Unknown => {
325328
return Err(io::Error::new(
326329
io::ErrorKind::NotConnected,

0 commit comments

Comments
 (0)