Commit 3d714f1c authored by Jeremy Soller's avatar Jeremy Soller

Some fixes for cooked mode

parent 0a4b617e
......@@ -65,9 +65,15 @@ impl Scheme for DisplayScheme {
fn write(&self, id: usize, buf: &[u8]) -> Result<usize> {
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 {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment