summaryrefslogtreecommitdiff
path: root/sys/dev/cons/cons.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/cons/cons.c')
-rw-r--r--sys/dev/cons/cons.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/dev/cons/cons.c b/sys/dev/cons/cons.c
index bcd19bf..61254a7 100644
--- a/sys/dev/cons/cons.c
+++ b/sys/dev/cons/cons.c
@@ -165,8 +165,10 @@ cons_handle_special(struct cons_screen *scr, char c)
}
HIDE_CURSOR(scr);
- --scr->ch_col;
- --scr->curs_col;
+ if (scr->ch_col > 0 && scr->curs_col > 0) {
+ --scr->ch_col;
+ --scr->curs_col;
+ }
SHOW_CURSOR(scr);
return 0;
case ASCII_LF: