diff options
author | dzwdz | 2023-06-08 18:49:41 +0200 |
---|---|---|
committer | dzwdz | 2023-06-08 18:49:41 +0200 |
commit | 8c1d2e29b9ef3472b46d6997ffde5ca38afdb5f3 (patch) | |
tree | 32ad1119219e3208cf66436d88e7e98cebc01c30 /src/user | |
parent | 8f0c4e62ffeff86148547c968b0743813d70e649 (diff) |
user/vterm: support displaying tabs
Diffstat (limited to 'src/user')
-rw-r--r-- | src/user/app/vterm/vterm.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/user/app/vterm/vterm.c b/src/user/app/vterm/vterm.c index a7d5bcc..f365f6b 100644 --- a/src/user/app/vterm/vterm.c +++ b/src/user/app/vterm/vterm.c @@ -18,6 +18,11 @@ void in_char(char c) { case '\b': if (cursor.x > 0) cursor.x--; break; + case '\t': + /* rounds down to nearest multiple of 8 and adds 8 + = adding 1 and rounding up to the nearest multiple of 8 */ + cursor.x = (cursor.x & ~7) + 8; + break; default: font_blit(c, cursor.x, cursor.y); cursor.x++; |