From ccc8ef9606d90e7b032f6b20f965758df1774a58 Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Tue, 16 Jul 2019 13:17:51 +0200 Subject: terminal: foreground/background in cell attributes are now uint32_t This reduces the cell size, and thus improves the cache behavour --- terminal.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'terminal.c') 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 { -- cgit v1.3