Set scrolling region top correctly.

Fixes scrolling bug in sub-windows.
This commit is contained in:
jdc 2001-05-17 19:04:01 +00:00
parent bc8eda57c9
commit 048f92e86e
2 changed files with 6 additions and 6 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: newwin.c,v 1.24 2001/04/20 12:56:09 jdc Exp $ */
/* $NetBSD: newwin.c,v 1.25 2001/05/17 19:04:01 jdc Exp $ */
/*
* Copyright (c) 1981, 1993, 1994
@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)newwin.c 8.3 (Berkeley) 7/27/94";
#else
__RCSID("$NetBSD: newwin.c,v 1.24 2001/04/20 12:56:09 jdc Exp $");
__RCSID("$NetBSD: newwin.c,v 1.25 2001/05/17 19:04:01 jdc Exp $");
#endif
#endif /* not lint */
@ -273,7 +273,7 @@ __makenew(int nlines, int ncols, int by, int bx, int sub)
win->wattr = 0;
win->bch = ' ';
win->battr = 0;
win->scr_t = win->begy;
win->scr_t = 0;
win->scr_b = win->maxy - 1;
__swflags(win);
#ifdef DEBUG

View File

@ -1,4 +1,4 @@
/* $NetBSD: scroll.c,v 1.15 2001/04/20 12:56:09 jdc Exp $ */
/* $NetBSD: scroll.c,v 1.16 2001/05/17 19:04:01 jdc Exp $ */
/*
* Copyright (c) 1981, 1993, 1994
@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)scroll.c 8.3 (Berkeley) 5/4/94";
#else
__RCSID("$NetBSD: scroll.c,v 1.15 2001/04/20 12:56:09 jdc Exp $");
__RCSID("$NetBSD: scroll.c,v 1.16 2001/05/17 19:04:01 jdc Exp $");
#endif
#endif /* not lint */
@ -128,7 +128,7 @@ wscrl(WINDOW *win, int lines)
int
wsetscrreg(WINDOW *win, int top, int bottom)
{
if (top < win->begy || bottom >= win->maxy || bottom - top < 1)
if (top < 0 || bottom >= win->maxy || bottom - top < 1)
return (ERR);
win->scr_t = top;
win->scr_b = bottom;