Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libcurses Remove checks for cursor being in scrolling re...



details:   https://anonhg.NetBSD.org/src/rev/441deada70f7
branches:  trunk
changeset: 821587:441deada70f7
user:      blymn <blymn%NetBSD.org@localhost>
date:      Fri Feb 10 06:25:28 2017 +0000

description:
Remove checks for cursor being in scrolling region, ncurses doesn't
do checking, rather just scrolls the scrolling region so we shall
follow suit.  SUSv2 says what is happens when scrl is called with the
cursor outside the scrolling is undefined so we should match ncurses.
This fixes PR#51819 without forcing tin to use terminfo directly.

diffstat:

 lib/libcurses/scroll.c |  11 +++--------
 1 files changed, 3 insertions(+), 8 deletions(-)

diffs (32 lines):

diff -r f39f70a7a1d7 -r 441deada70f7 lib/libcurses/scroll.c
--- a/lib/libcurses/scroll.c    Fri Feb 10 04:34:11 2017 +0000
+++ b/lib/libcurses/scroll.c    Fri Feb 10 06:25:28 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: scroll.c,v 1.23 2017/01/06 13:53:18 roy Exp $  */
+/*     $NetBSD: scroll.c,v 1.24 2017/02/10 06:25:28 blymn Exp $        */
 
 /*
  * Copyright (c) 1981, 1993, 1994
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)scroll.c   8.3 (Berkeley) 5/4/94";
 #else
-__RCSID("$NetBSD: scroll.c,v 1.23 2017/01/06 13:53:18 roy Exp $");
+__RCSID("$NetBSD: scroll.c,v 1.24 2017/02/10 06:25:28 blymn Exp $");
 #endif
 #endif                         /* not lint */
 
@@ -100,12 +100,7 @@
 #ifdef DEBUG
        __CTRACE(__CTRACE_WINDOW, "wscrl: y=%d\n", oy);
 #endif
-       if (oy < win->scr_t || oy > win->scr_b)
-               /* Outside scrolling region */
-               wmove(win, 0, 0);
-       else
-               /* Inside scrolling region */
-               wmove(win, win->scr_t, 0);
+       wmove(win, win->scr_t, 0);
        winsdelln(win, 0 - nlines);
        wmove(win, oy, ox);
 



Home | Main Index | Thread Index | Old Index