svn commit: r226183 - head/sys/teken

Ed Schouten ed at FreeBSD.org
Mon Oct 10 06:13:27 UTC 2011


Author: ed
Date: Mon Oct 10 06:13:27 2011
New Revision: 226183
URL: http://svn.freebsd.org/changeset/base/226183

Log:
  Properly use the cursor to bound the position for CUP.
  
  We must take the origin region into account when clamping the cursor
  position.
  
  MFC after:	3 days

Modified:
  head/sys/teken/teken_subr.h

Modified: head/sys/teken/teken_subr.h
==============================================================================
--- head/sys/teken/teken_subr.h	Mon Oct 10 02:54:58 2011	(r226182)
+++ head/sys/teken/teken_subr.h	Mon Oct 10 06:13:27 2011	(r226183)
@@ -325,7 +325,7 @@ teken_subr_cursor_position(teken_t *t, u
 {
 
 	t->t_cursor.tp_row = t->t_originreg.ts_begin + row - 1;
-	if (row >= t->t_originreg.ts_end)
+	if (t->t_cursor.tp_row >= t->t_originreg.ts_end)
 		t->t_cursor.tp_row = t->t_originreg.ts_end - 1;
 
 	t->t_cursor.tp_col = col - 1;


More information about the svn-src-head mailing list