summaryrefslogtreecommitdiffstats
path: root/sys/dev/syscons
diff options
context:
space:
mode:
authored <ed@FreeBSD.org>2009-01-04 22:24:47 +0000
committered <ed@FreeBSD.org>2009-01-04 22:24:47 +0000
commit635e416e5aed45285a2e1287533cf4bc3f500047 (patch)
treef265d92fdc10dfc7ed0b2400333d58524f98ff92 /sys/dev/syscons
parent1cfb2a06d07fd806fc299ba4e2dd793cb808c306 (diff)
downloadFreeBSD-src-635e416e5aed45285a2e1287533cf4bc3f500047.zip
FreeBSD-src-635e416e5aed45285a2e1287533cf4bc3f500047.tar.gz
Fix rendering glitch in cons25 emulation.
Because we now have cons25-style linewrapping, we must also use cons25- style reverse linewrapping. This means that a ^H on column 0 will move the cursor one line up. Also fix a small regression: if the user invokes a RIS (Reset to Initial State), we must show the cursor again. Spotted by: Paul B. Mahol <onemda gmail com>
Diffstat (limited to 'sys/dev/syscons')
-rw-r--r--sys/dev/syscons/teken/teken_subr.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/sys/dev/syscons/teken/teken_subr.h b/sys/dev/syscons/teken/teken_subr.h
index d8319f6..3288586 100644
--- a/sys/dev/syscons/teken/teken_subr.h
+++ b/sys/dev/syscons/teken/teken_subr.h
@@ -198,11 +198,22 @@ static void
teken_subr_backspace(teken_t *t)
{
+#ifdef TEKEN_CONS25
+ if (t->t_cursor.tp_col == 0) {
+ if (t->t_cursor.tp_row == t->t_originreg.ts_begin)
+ return;
+ t->t_cursor.tp_row--;
+ t->t_cursor.tp_col = t->t_winsize.tp_col - 1;
+ } else {
+ t->t_cursor.tp_col--;
+ }
+#else /* !TEKEN_CONS25 */
if (t->t_cursor.tp_col == 0)
return;
t->t_cursor.tp_col--;
t->t_stateflags &= ~TS_WRAPPED;
+#endif /* TEKEN_CONS25 */
teken_funcs_cursor(t);
}
@@ -862,6 +873,7 @@ teken_subr_reset_to_initial_state(teken_t *t)
teken_subr_do_reset(t);
teken_subr_erase_display(t, 2);
+ teken_funcs_param(t, TP_SHOWCURSOR, 1);
teken_funcs_cursor(t);
}
OpenPOWER on IntegriCloud