Skip to content

Commit f54461e

Browse files
committed
Emit 0x08 (the backspace character) to erase text.
1 parent 9870ba2 commit f54461e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/lib.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,9 +146,10 @@ where
146146
writeln!(self.output, "Input not valid UTF8").unwrap();
147147
Outcome::CommandProcessed
148148
}
149-
} else if input == 0x7F {
149+
} else if input == 0x08 {
150+
// Handling backspace
150151
if self.used > 0 {
151-
write!(self.output, "\u{007F} \u{007F}").unwrap();
152+
write!(self.output, "\u{0008} \u{0008}").unwrap();
152153
self.used -= 1;
153154
}
154155
Outcome::NeedMore

0 commit comments

Comments
 (0)