From 1259994283d5181e40238e6b170d58ac16049d68 Mon Sep 17 00:00:00 2001 From: Ed Schouten Date: Sun, 4 Jan 2009 22:24:47 +0000 Subject: 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 --- sys/dev/syscons/teken/teken_subr.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/sys/dev/syscons/teken/teken_subr.h b/sys/dev/syscons/teken/teken_subr.h index d8319f676f01..328858640b94 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); } -- cgit v1.3