summaryrefslogtreecommitdiff
path: root/sys/dev/vcons
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2024-05-12 19:31:02 -0400
committerIan Moffett <ian@osmora.org>2024-05-12 19:31:02 -0400
commitb7b4b42f19edcdc751688b691ad985d2e6fd91ff (patch)
tree98d9a53d063f8d8dca1ea42e6c85bbeb67a96ffa /sys/dev/vcons
parent3d1cd5d83b07686e67de5c311e28372c175ddc9f (diff)
kernel: vcons: Support ASCII_BS for backspace
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'sys/dev/vcons')
-rw-r--r--sys/dev/vcons/vcons_io.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/dev/vcons/vcons_io.c b/sys/dev/vcons/vcons_io.c
index 4c0151a..f4e693e 100644
--- a/sys/dev/vcons/vcons_io.c
+++ b/sys/dev/vcons/vcons_io.c
@@ -69,6 +69,12 @@ vcons_process_output(struct vcons_screen *scr, int c)
case ASCII_HT:
vcons_expand_tab(scr);
break;
+ case ASCII_BS:
+ if (cursor->xpos > 0) {
+ scr->cpy_x--;
+ cursor->xpos -= FONT_WIDTH;
+ }
+ break;
default:
return -1;
}