Add support for BCE (background colour erase). This makes various escape

sequences (notable EL and ED but also IL, DL, ICH, DCH) create blank
cells using the current background colour rather than the default
colour.

On modern systems BCE doesn't really have many benefits, but most other
terminals now support it, some (lazy) applications rely on it, and it is
not hard to include now that we have pane background colours anyway.

Mostly written by Sean Haugh.
This commit is contained in:
nicm
2016-10-13 20:27:27 +00:00
parent 1bd08f903b
commit 4179b42424
12 changed files with 278 additions and 198 deletions

View File

@ -60,7 +60,7 @@ screen_reinit(struct screen *s)
screen_reset_tabs(s);
grid_clear_lines(s->grid, s->grid->hsize, s->grid->sy);
grid_clear_lines(s->grid, s->grid->hsize, s->grid->sy, 8);
screen_clear_selection(s);
}
@ -193,7 +193,8 @@ screen_resize_y(struct screen *s, u_int sy)
if (available > 0) {
if (available > needed)
available = needed;
grid_view_delete_lines(gd, oldy - available, available);
grid_view_delete_lines(gd, oldy - available, available,
8);
}
needed -= available;
@ -209,7 +210,7 @@ screen_resize_y(struct screen *s, u_int sy)
} else if (needed > 0 && available > 0) {
if (available > needed)
available = needed;
grid_view_delete_lines(gd, 0, available);
grid_view_delete_lines(gd, 0, available, 8);
}
s->cy -= needed;
}