Mark all lines on new pads as dirty. This ensures that we draw blank

(untouched) lines when the pad is refreshed.
This commit is contained in:
jdc 2003-06-09 06:58:11 +00:00
parent eaaa8e8699
commit 44d2f865a0
1 changed files with 13 additions and 5 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: newwin.c,v 1.35 2003/04/08 05:56:01 jdc Exp $ */ /* $NetBSD: newwin.c,v 1.36 2003/06/09 06:58:11 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.35 2003/04/08 05:56:01 jdc Exp $"); __RCSID("$NetBSD: newwin.c,v 1.36 2003/06/09 06:58:11 jdc Exp $");
#endif #endif
#endif /* not lint */ #endif /* not lint */
@ -153,7 +153,10 @@ __newwin(SCREEN *screen, int nlines, int ncols, int by, int bx, int ispad)
for (i = 0; i < maxy; i++) { for (i = 0; i < maxy; i++) {
lp = win->lines[i]; lp = win->lines[i];
lp->flags = 0; if (ispad)
lp->flags = __ISDIRTY;
else
lp->flags = 0;
for (sp = lp->line, j = 0; j < maxx; j++, sp++) { for (sp = lp->line, j = 0; j < maxx; j++, sp++) {
sp->ch = ' '; sp->ch = ' ';
sp->bch = ' '; sp->bch = ' ';
@ -320,8 +323,13 @@ __makenew(SCREEN *screen, int nlines, int ncols, int by, int bx, int sub,
#endif #endif
lp->firstchp = &lp->firstch; lp->firstchp = &lp->firstch;
lp->lastchp = &lp->lastch; lp->lastchp = &lp->lastch;
lp->firstch = ncols; if (ispad) {
lp->lastch = 0; lp->firstch = 0;
lp->lastch = ncols;
} else {
lp->firstch = ncols;
lp->lastch = 0;
}
} }
} }
#ifdef DEBUG #ifdef DEBUG