aboutsummaryrefslogtreecommitdiff
path: root/terminal.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2019-07-16 11:17:51 +0000
committerDaniel Eklöf <daniel@ekloef.se>2019-07-16 11:17:51 +0000
commitccc8ef9606d90e7b032f6b20f965758df1774a58 (patch)
tree6d01522e25b5d88e05930b399a3d98f4c5a97d9f /terminal.c
parentcsi: implement \E[21m (disable bold) (diff)
terminal: foreground/background in cell attributes are now uint32_t
This reduces the cell size, and thus improves the cache behavour
Diffstat (limited to 'terminal.c')
-rw-r--r--terminal.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/terminal.c b/terminal.c
index 5e0f625f..8871c06f 100644
--- a/terminal.c
+++ b/terminal.c
@@ -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 {