From dc676f194bca897ea331926f005a98a2568164b6 Mon Sep 17 00:00:00 2001 From: foamyguy Date: Thu, 8 May 2025 13:57:23 -0500 Subject: [PATCH 1/2] show 4 spaces in place of tab in Terminal --- shared-module/terminalio/Terminal.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/shared-module/terminalio/Terminal.c b/shared-module/terminalio/Terminal.c index 02bcffb30c5f2..1e2758780806e 100644 --- a/shared-module/terminalio/Terminal.c +++ b/shared-module/terminalio/Terminal.c @@ -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') { From 5b621b0bad9f21087e460a693788d397d87f418f Mon Sep 17 00:00:00 2001 From: foamyguy Date: Thu, 8 May 2025 14:32:18 -0500 Subject: [PATCH 2/2] format --- shared-module/terminalio/Terminal.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/shared-module/terminalio/Terminal.c b/shared-module/terminalio/Terminal.c index 1e2758780806e..c5a52ce39033f 100644 --- a/shared-module/terminalio/Terminal.c +++ b/shared-module/terminalio/Terminal.c @@ -226,11 +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 == '\t'){ - for (uint8_t space_i = 0; space_i < 4; space_i++){ - terminalio_terminal_set_tile(self, false, ' ', true); - } - }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') { pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy