mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-05 04:06:08 -05:00
term: cell erase: reset *all* attributes *except* background
This commit is contained in:
parent
6e233f8272
commit
9a0d440e95
1 changed files with 1 additions and 4 deletions
|
|
@ -163,15 +163,12 @@ erase_cell_range(struct terminal *term, struct row *row, int start, int end)
|
|||
assert(start < term->cols);
|
||||
assert(end < term->cols);
|
||||
|
||||
memset(&row->cells[start], 0, (end - start + 1) * sizeof(row->cells[0]));
|
||||
if (unlikely(term->vt.attrs.have_bg)) {
|
||||
for (int col = start; col <= end; col++) {
|
||||
row->cells[col].wc = 0;
|
||||
row->cells[col].attrs.clean = 0;
|
||||
row->cells[col].attrs.have_bg = 1;
|
||||
row->cells[col].attrs.bg = term->vt.attrs.bg;
|
||||
}
|
||||
} else {
|
||||
memset(&row->cells[start], 0, (end - start + 1) * sizeof(row->cells[0]));
|
||||
}
|
||||
row->dirty = true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue