term: no need to set attrs.clean=0 right after copying the VT attrs struct

When printing a character to a cell, we copy the current VT state’s
attributes to the cell. And then clear the ‘clean’ bit.

But the ‘clean’ bit is part of the VT state, and is *always*
zero. Thus there’s no need to explicitly clear it right after copying
the VT state.
This commit is contained in:
Daniel Eklöf 2021-06-15 12:38:35 +02:00
parent d1d145e7c1
commit 5caa87adaf
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

View file

@ -2742,7 +2742,6 @@ print_spacer(struct terminal *term, int col, int remaining)
cell->wc = CELL_SPACER + remaining;
cell->attrs = term->vt.attrs;
cell->attrs.clean = 0;
}
void
@ -2792,7 +2791,6 @@ term_print(struct terminal *term, wchar_t wc, int width)
row->dirty = true;
row->linebreak = false;
cell->attrs.clean = 0;
/* Advance cursor the 'additional' columns while dirty:ing the cells */
for (int i = 1; i < width && term->grid->cursor.point.col < term->cols - 1; i++) {
@ -2832,7 +2830,6 @@ ascii_printer_fast(struct terminal *term, wchar_t wc)
row->dirty = true;
row->linebreak = false;
cell->attrs.clean = 0;
/* Advance cursor */
if (unlikely(++term->grid->cursor.point.col >= term->cols)) {