From owner-svn-src-all@FreeBSD.ORG Mon Oct 10 06:13:27 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8EAE410657F1; Mon, 10 Oct 2011 06:13:27 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7E9B38FC13; Mon, 10 Oct 2011 06:13:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9A6DRCk045388; Mon, 10 Oct 2011 06:13:27 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9A6DRmB045386; Mon, 10 Oct 2011 06:13:27 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201110100613.p9A6DRmB045386@svn.freebsd.org> From: Ed Schouten Date: Mon, 10 Oct 2011 06:13:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226183 - head/sys/teken X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Oct 2011 06:13:27 -0000 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;