diff options
author | Ian Moffett <ian@osmora.org> | 2025-06-28 18:48:51 -0400 |
---|---|---|
committer | Ian Moffett <ian@osmora.org> | 2025-06-28 18:48:51 -0400 |
commit | d8a8fa32fb988e91cce17b18e2b79d35793526b6 (patch) | |
tree | 50d968705823c9cf78a09ced222f2ee6238c3fe6 /sys/dev | |
parent | 6dd6c29e4ebad3a9adeab6069bc2d6387d745ea9 (diff) |
kernel: cons: Handle horizontal tabs ('\t')
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/cons/cons.c | 9 |
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: |