Skip to content

Commit dc676f1

Browse files
committed
show 4 spaces in place of tab in Terminal
1 parent 07ec0c6 commit dc676f1

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

shared-module/terminalio/Terminal.c

+5-1
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,11 @@ size_t common_hal_terminalio_terminal_write(terminalio_terminal_obj_t *self, con
226226
if (c < 0x20) {
227227
if (c == '\r') {
228228
self->cursor_x = 0;
229-
} else if (c == '\n') {
229+
} else if (c == '\t'){
230+
for (uint8_t space_i = 0; space_i < 4; space_i++){
231+
terminalio_terminal_set_tile(self, false, ' ', true);
232+
}
233+
}else if (c == '\n') {
230234
self->cursor_y++;
231235
// Commands below are used by MicroPython in the REPL
232236
} else if (c == '\b') {

0 commit comments

Comments
 (0)