svn commit: r186753 - head/sys/dev/syscons/teken
Ed Schouten
ed at FreeBSD.org
Sun Jan 4 14:24:49 PST 2009
Author: ed
Date: Sun Jan 4 22:24:47 2009
New Revision: 186753
URL: http://svn.freebsd.org/changeset/base/186753
Log:
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>
Modified:
head/sys/dev/syscons/teken/teken_subr.h
Modified: head/sys/dev/syscons/teken/teken_subr.h
==============================================================================
--- head/sys/dev/syscons/teken/teken_subr.h Sun Jan 4 22:15:15 2009 (r186752)
+++ head/sys/dev/syscons/teken/teken_subr.h Sun Jan 4 22:24:47 2009 (r186753)
@@ -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_
teken_subr_do_reset(t);
teken_subr_erase_display(t, 2);
+ teken_funcs_param(t, TP_SHOWCURSOR, 1);
teken_funcs_cursor(t);
}
More information about the svn-src-all
mailing list