Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 4 Jan 2009 22:24:47 +0000 (UTC)
From:      Ed Schouten <ed@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r186753 - head/sys/dev/syscons/teken
Message-ID:  <200901042224.n04MOlK7075867@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);
 }
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200901042224.n04MOlK7075867>