mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-15 08:30:02 +00:00
interpret more escape codes gracefully
This commit is contained in:
parent
a9abba0bb0
commit
5935406f89
1 changed files with 11 additions and 2 deletions
|
|
@ -219,8 +219,17 @@ fn esc_match(esc_chars: &[u8]) -> Result<Option<char>, ()> {
|
|||
}
|
||||
}
|
||||
1 => {
|
||||
if c != 0x5b {
|
||||
return Err(());
|
||||
match c {
|
||||
0x41 => return Ok(Some('↑')),
|
||||
0x42 => return Ok(Some('↓')),
|
||||
0x43 => return Ok(Some('→')),
|
||||
0x44 => return Ok(Some('←')),
|
||||
0x7e => return Err(()), // premature end
|
||||
_ => {
|
||||
if c != 0x5b {
|
||||
return Err(());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
2 => match c {
|
||||
|
|
|
|||
Loading…
Reference in a new issue