Date: Fri, 25 Sep 2009 11:58:51 +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: r197480 - head/sys/teken Message-ID: <200909251158.n8PBwpbI028049@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200909251158.n8PBwpbI028049>