From owner-svn-src-all@FreeBSD.ORG Wed Oct 12 09:28:09 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 E7059106566C; Wed, 12 Oct 2011 09:28:09 +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 BCFB88FC0A; Wed, 12 Oct 2011 09:28:09 +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 p9C9S9Nc056931; Wed, 12 Oct 2011 09:28:09 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9C9S9Xq056929; Wed, 12 Oct 2011 09:28:09 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201110120928.p9C9S9Xq056929@svn.freebsd.org> From: Ed Schouten Date: Wed, 12 Oct 2011 09:28:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226295 - stable/9/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: Wed, 12 Oct 2011 09:28:10 -0000 Author: ed Date: Wed Oct 12 09:28:09 2011 New Revision: 226295 URL: http://svn.freebsd.org/changeset/base/226295 Log: MFC r226099: Tab should not blank cells. It seems I was under the impression that a tab differs from a single forward tabulation, namely that it blanks the underlying cells. This seems not to be the case. They are identical. This should fix applications like jove(1) that use tabs instead of explicit cursor position setting. Reported by: Brett Glass MFC r226183: Properly use the cursor to bound the position for CUP. We must take the origin region into account when clamping the cursor position. Approved by: re@ (kib) Modified: stable/9/sys/teken/teken_subr.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) Modified: stable/9/sys/teken/teken_subr.h ============================================================================== --- stable/9/sys/teken/teken_subr.h Wed Oct 12 09:21:02 2011 (r226294) +++ stable/9/sys/teken/teken_subr.h Wed Oct 12 09:28:09 2011 (r226295) @@ -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; @@ -595,20 +595,7 @@ static void teken_subr_horizontal_tab(teken_t *t) { - if (t->t_stateflags & TS_CONS25) { - teken_subr_cursor_forward_tabulation(t, 1); - } else { - teken_rect_t tr; - - tr.tr_begin = t->t_cursor; - teken_subr_cursor_forward_tabulation(t, 1); - tr.tr_end.tp_row = tr.tr_begin.tp_row + 1; - tr.tr_end.tp_col = t->t_cursor.tp_col; - - /* Blank region that we skipped. */ - if (tr.tr_end.tp_col > tr.tr_begin.tp_col) - teken_funcs_fill(t, &tr, BLANK, &t->t_curattr); - } + teken_subr_cursor_forward_tabulation(t, 1); } static void