From 21d10e68940743dc6ef1d235b455b00c71540905 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Thu, 6 Dec 2007 21:57:57 +0000 Subject: Use the current attr/colours for filling in new areas, this fixes the echo \\033[35\;46m\\033[2J bug. --- screen.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'screen.c') 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 @@ -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. */ -- cgit