Better display of control codes

This commit is contained in:
Joshua Barretto 2025-09-23 16:58:15 +01:00
parent d13982cc05
commit b0ff49cbb6

View file

@ -394,6 +394,9 @@ impl<'a> Terminal<'a> {
// Convert non-printable chars
let c = match self.fb[0].cells[pos].c {
c if c.is_whitespace() => ' ',
c if c.is_control() => {
char::from_u32(9216 + c as u32).unwrap_or('?')
}
c => c,
};
stdout.queue(style::Print(c)).unwrap();