mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-06 01:40:22 -05:00
terminal: foreground/background in cell attributes are now uint32_t
This reduces the cell size, and thus improves the cache behavour
This commit is contained in:
parent
2a1c4d29e9
commit
ccc8ef9606
5 changed files with 123 additions and 62 deletions
|
|
@ -72,10 +72,9 @@ erase_cell_range(struct terminal *term, struct row *row, int start, int end)
|
|||
assert(start < term->cols);
|
||||
assert(end < term->cols);
|
||||
|
||||
if (unlikely(term->vt.attrs.have_background)) {
|
||||
if (unlikely(term->vt.attrs.background >> 31)) {
|
||||
for (int col = start; col <= end; col++) {
|
||||
row->cells[col].c[0] = '\0';
|
||||
row->cells[col].attrs.have_background = true;
|
||||
row->cells[col].attrs.background = term->vt.attrs.background;
|
||||
}
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue