Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 9 Aug 2010 18:07:15 +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: r211113 - head/sys/teken
Message-ID:  <201008091807.o79I7FZI065648@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ed
Date: Mon Aug  9 18:07:15 2010
New Revision: 211113
URL: http://svn.freebsd.org/changeset/base/211113

Log:
  Make ^L with cons25 and origin mode bit more sane.
  
  Even though cons25 normally doesn't support origin regions, this
  emulator does allow you to do it. It makes more sense to blank only the
  origin region when emitting ^L instead of blanking the entire screen.
  Apart from that, we should always place the cursor inside the origin
  region, which doesn't happen right now.

Modified:
  head/sys/teken/teken_subr.h

Modified: head/sys/teken/teken_subr.h
==============================================================================
--- head/sys/teken/teken_subr.h	Mon Aug  9 17:54:26 2010	(r211112)
+++ head/sys/teken/teken_subr.h	Mon Aug  9 18:07:15 2010	(r211113)
@@ -725,11 +725,17 @@ teken_subr_newpage(teken_t *t)
 	if (t->t_stateflags & TS_CONS25) {
 		teken_rect_t tr;
 
-		tr.tr_begin.tp_row = tr.tr_begin.tp_col = 0;
-		tr.tr_end = t->t_winsize;
+		/* Clear screen. */
+		tr.tr_begin.tp_row = t->t_originreg.ts_begin;
+		tr.tr_begin.tp_col = 0;
+		tr.tr_end.tp_row = t->t_originreg.ts_end;
+		tr.tr_end.tp_col = t->t_winsize.tp_col;
 		teken_funcs_fill(t, &tr, BLANK, &t->t_curattr);
 
-		t->t_cursor.tp_row = t->t_cursor.tp_col = 0;
+		/* Cursor at top left. */
+		t->t_cursor.tp_row = t->t_originreg.ts_begin;
+		t->t_cursor.tp_col = 0;
+		t->t_stateflags &= ~TS_WRAPPED;
 		teken_funcs_cursor(t);
 	} else {
 		teken_subr_newline(t);



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