From 3d714f1c3bf57fbc72186b4cb2b90c553ce6b0bd Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Wed, 28 Sep 2016 15:04:15 -0600 Subject: [PATCH] Some fixes for cooked mode --- vesad/src/main.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/vesad/src/main.rs b/vesad/src/main.rs index f173bc47c9..88eafcfb19 100644 --- a/vesad/src/main.rs +++ b/vesad/src/main.rs @@ -65,9 +65,15 @@ impl Scheme for DisplayScheme { fn write(&self, id: usize, buf: &[u8]) -> Result { if id == 1 { - let mut input = self.input.borrow_mut(); for &b in buf.iter() { - input.push_back(b); + self.input.borrow_mut().push_back(b); + if ! self.console.borrow().raw_mode { + if b == 0x7F { + self.write(0, b"\x08")?; + } else { + self.write(0, &[b])?; + } + } } Ok(buf.len()) } else {