Set scrolling region top correctly.
Fixes scrolling bug in sub-windows.
This commit is contained in:
parent
bc8eda57c9
commit
048f92e86e
|
@ -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
|
* Copyright (c) 1981, 1993, 1994
|
||||||
|
@ -38,7 +38,7 @@
|
||||||
#if 0
|
#if 0
|
||||||
static char sccsid[] = "@(#)newwin.c 8.3 (Berkeley) 7/27/94";
|
static char sccsid[] = "@(#)newwin.c 8.3 (Berkeley) 7/27/94";
|
||||||
#else
|
#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
|
||||||
#endif /* not lint */
|
#endif /* not lint */
|
||||||
|
|
||||||
|
@ -273,7 +273,7 @@ __makenew(int nlines, int ncols, int by, int bx, int sub)
|
||||||
win->wattr = 0;
|
win->wattr = 0;
|
||||||
win->bch = ' ';
|
win->bch = ' ';
|
||||||
win->battr = 0;
|
win->battr = 0;
|
||||||
win->scr_t = win->begy;
|
win->scr_t = 0;
|
||||||
win->scr_b = win->maxy - 1;
|
win->scr_b = win->maxy - 1;
|
||||||
__swflags(win);
|
__swflags(win);
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
|
|
|
@ -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
|
* Copyright (c) 1981, 1993, 1994
|
||||||
|
@ -38,7 +38,7 @@
|
||||||
#if 0
|
#if 0
|
||||||
static char sccsid[] = "@(#)scroll.c 8.3 (Berkeley) 5/4/94";
|
static char sccsid[] = "@(#)scroll.c 8.3 (Berkeley) 5/4/94";
|
||||||
#else
|
#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
|
||||||
#endif /* not lint */
|
#endif /* not lint */
|
||||||
|
|
||||||
|
@ -128,7 +128,7 @@ wscrl(WINDOW *win, int lines)
|
||||||
int
|
int
|
||||||
wsetscrreg(WINDOW *win, int top, int bottom)
|
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);
|
return (ERR);
|
||||||
win->scr_t = top;
|
win->scr_t = top;
|
||||||
win->scr_b = bottom;
|
win->scr_b = bottom;
|
||||||
|
|
Loading…
Reference in New Issue