From owner-svn-src-all@FreeBSD.ORG Fri Sep 25 11:58:51 2009 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 B29A2106568D; Fri, 25 Sep 2009 11:58:51 +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 A1AC08FC13; Fri, 25 Sep 2009 11:58:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n8PBwpoJ028051; Fri, 25 Sep 2009 11:58:51 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n8PBwpbI028049; Fri, 25 Sep 2009 11:58:51 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <200909251158.n8PBwpbI028049@svn.freebsd.org> From: Ed Schouten Date: Fri, 25 Sep 2009 11:58:51 +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: r197480 - 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: Fri, 25 Sep 2009 11:58:51 -0000 Author: ed Date: Fri Sep 25 11:58:51 2009 New Revision: 197480 URL: http://svn.freebsd.org/changeset/base/197480 Log: Conformance: ignore {delete,insert} line while outside the scrolling region. I noticed a small inconsistency in delete and insert line between xterm and libteken. libteken allows these actions to happen while the cursor is placed outside the scrolling region, while xterm does not. This behaviour seems to be VT100-like. Confirmation: http://www.vt100.net/docs/vt102-ug/chapter5.html "This sequence is ignored when cursor is outside scrolling region." MFC after: 1 month Modified: head/sys/teken/teken_subr.h Modified: head/sys/teken/teken_subr.h ============================================================================== --- head/sys/teken/teken_subr.h Fri Sep 25 07:57:28 2009 (r197479) +++ head/sys/teken/teken_subr.h Fri Sep 25 11:58:51 2009 (r197480) @@ -397,6 +397,11 @@ teken_subr_delete_line(teken_t *t, unsig { teken_rect_t tr; + /* Ignore if outside scrolling region. */ + if (t->t_cursor.tp_row < t->t_scrollreg.ts_begin || + t->t_cursor.tp_row >= t->t_scrollreg.ts_end) + return; + tr.tr_begin.tp_col = 0; tr.tr_end.tp_row = t->t_scrollreg.ts_end; tr.tr_end.tp_col = t->t_winsize.tp_col; @@ -656,6 +661,11 @@ teken_subr_insert_line(teken_t *t, unsig { teken_rect_t tr; + /* Ignore if outside scrolling region. */ + if (t->t_cursor.tp_row < t->t_scrollreg.ts_begin || + t->t_cursor.tp_row >= t->t_scrollreg.ts_end) + return; + tr.tr_begin.tp_row = t->t_cursor.tp_row; tr.tr_begin.tp_col = 0; tr.tr_end.tp_col = t->t_winsize.tp_col;