summaryrefslogtreecommitdiffstats
path: root/screen.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2007-12-06 21:57:57 +0000
committerNicholas Marriott <nicholas.marriott@gmail.com>2007-12-06 21:57:57 +0000
commit21d10e68940743dc6ef1d235b455b00c71540905 (patch)
tree5bd3870ee8884dd1284c47eccce1667eea0eed53 /screen.c
parent9a37eb4d94ab26b2d70ead0f75ff90817c274418 (diff)
Use the current attr/colours for filling in new areas, this fixes the echo \\033[35\;46m\\033[2J bug.
Diffstat (limited to 'screen.c')
-rw-r--r--screen.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/screen.c b/screen.c
index 051d5ef5..89dd5d63 100644
--- a/screen.c
+++ b/screen.c
@@ -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. */