Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 10 Oct 2011 06:13:27 +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: r226183 - head/sys/teken
Message-ID:  <201110100613.p9A6DRmB045386@svn.freebsd.org>

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



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