Skip to content

Commit 71ba3ad

Browse files
authored
Merge pull request #10324 from FoamyGuy/tabs_in_terminal
show 4 spaces in place of tab in Terminal
2 parents 781fb9e + 5b621b0 commit 71ba3ad

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

shared-module/terminalio/Terminal.c

+4
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,10 @@ 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 == '\t') {
230+
for (uint8_t space_i = 0; space_i < 4; space_i++) {
231+
terminalio_terminal_set_tile(self, false, ' ', true);
232+
}
229233
} else if (c == '\n') {
230234
self->cursor_y++;
231235
// Commands below are used by MicroPython in the REPL

0 commit comments

Comments
 (0)