Skip to content

Commit

Permalink
Merge pull request #113 from RichRandall/master
Browse files Browse the repository at this point in the history
Append final newline in read_line_initial_text
  • Loading branch information
pksunkara committed Feb 11, 2022
2 parents be1c287 + 5027e18 commit 5484ea9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/term.rs
Expand Up @@ -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,
Expand Down

0 comments on commit 5484ea9

Please sign in to comment.