mirror of https://github.com/rm-dr/daisy
Fixed printing on enter
parent
d452f76455
commit
bf287516ed
|
@ -188,6 +188,9 @@ pub fn main() -> Result<(), std::io::Error> {
|
||||||
if let Key::Char(q) = c.as_ref().unwrap() {
|
if let Key::Char(q) = c.as_ref().unwrap() {
|
||||||
match q {
|
match q {
|
||||||
'\n' => {
|
'\n' => {
|
||||||
|
// Print again without cursor, in case we pressed enter
|
||||||
|
// while inside a substitution
|
||||||
|
pb.write_prompt_nocursor(&mut stdout)?;
|
||||||
let in_str = pb.enter();
|
let in_str = pb.enter();
|
||||||
write!(stdout, "\r\n")?;
|
write!(stdout, "\r\n")?;
|
||||||
if in_str == "" { break; }
|
if in_str == "" { break; }
|
||||||
|
|
Loading…
Reference in New Issue