show 4 spaces in place of tab in Terminal

This commit is contained in:
foamyguy 2025-05-08 13:57:23 -05:00
parent 07ec0c6d09
commit dc676f194b

View file

@ -226,7 +226,11 @@ size_t common_hal_terminalio_terminal_write(terminalio_terminal_obj_t *self, con
if (c < 0x20) {
if (c == '\r') {
self->cursor_x = 0;
} else if (c == '\n') {
} else if (c == '\t'){
for (uint8_t space_i = 0; space_i < 4; space_i++){
terminalio_terminal_set_tile(self, false, ' ', true);
}
}else if (c == '\n') {
self->cursor_y++;
// Commands below are used by MicroPython in the REPL
} else if (c == '\b') {