Use the current attr/colours for filling in new areas, this fixes the echo \\033[35\;46m\\033[2J bug.

This commit is contained in:
Nicholas Marriott
2007-12-06 21:57:57 +00:00
parent 9a37eb4d94
commit 21d10e6894
5 changed files with 21 additions and 52 deletions

View File

@ -1,4 +1,4 @@
/* $Id: screen.c,v 1.56 2007-12-06 09:46:23 nicm Exp $ */
/* $Id: screen.c,v 1.57 2007-12-06 21:57:57 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@ -299,7 +299,8 @@ screen_set_cell(struct screen *s,
{
if (cx >= s->grid_size[cy]) {
if (data == SCREEN_DEFDATA &&
attr == SCREEN_DEFATTR && colr == SCREEN_DEFCOLR)
attr == SCREEN_DEFATTR &&
colr == SCREEN_DEFCOLR)
return;
screen_expand_line(s, cy, cx + 1);
}
@ -333,6 +334,12 @@ screen_make_lines(struct screen *s, u_int py, u_int ny)
s->grid_colr[i] = NULL;
s->grid_size[i] = 0;
}
/* XXX should this be done in the callers? */
if (s->attr != SCREEN_DEFATTR || s->colr != SCREEN_DEFCOLR) {
screen_fill_area(s, 0, py,
screen_size_x(s), ny, SCREEN_DEFDATA, s->attr, s->colr);
}
}
/* Free a range of ny lines at py. */