summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2025-06-28 18:48:51 -0400
committerIan Moffett <ian@osmora.org>2025-06-28 18:48:51 -0400
commitd8a8fa32fb988e91cce17b18e2b79d35793526b6 (patch)
tree50d968705823c9cf78a09ced222f2ee6238c3fe6 /sys
parent6dd6c29e4ebad3a9adeab6069bc2d6387d745ea9 (diff)
kernel: cons: Handle horizontal tabs ('\t')
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/cons/cons.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/sys/dev/cons/cons.c b/sys/dev/cons/cons.c
index 0735f11..8470a60 100644
--- a/sys/dev/cons/cons.c
+++ b/sys/dev/cons/cons.c
@@ -174,6 +174,15 @@ cons_handle_special(struct cons_screen *scr, char c)
}
switch (c) {
+ case ASCII_HT:
+ HIDE_CURSOR(scr);
+ scr->curs_col += 4;
+ scr->ch_col += 4;
+ if (scr->ch_col >= scr->ncols - 1) {
+ cons_handle_special(scr, '\n');
+ }
+ SHOW_CURSOR(scr);
+ return 0;
case ASCII_NUL:
return 0;
case ASCII_BS: