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.
This commit is contained in:
blymn 2017-02-10 06:25:28 +00:00
parent 3cda35de89
commit 871cddc640

View File

@ -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 @@ wscrl(WINDOW *win, int nlines)
#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);