diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2020-01-06 10:56:18 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2020-01-06 10:56:18 +0000 |
| commit | 457eb573c441826d4b3843c6c0ad36de097f17d7 (patch) | |
| tree | bc99f800f6ca2d19a1bc51e905be049e81dbc194 /render.c | |
| parent | selection: foreach_selection_*: must wrap row number (diff) | |
selection: update: don't dirty cells that don't change state
Previously when updating a selection, we would unmark *all* cells in
the old selection, and then mark all cells in the new selection.
This caused *all* cells to be dirtied and thus re-rendered.
Avoid this, by adding a temporary state to the cells' selected state.
Before unmarking the old selection, pre-mark the new selection using a
temporary state.
When unmarking the old selection, ignore cells in this temporary state.
When marking the new selection, ignore cells in this temporary
state (except clearing the temporary state).
Diffstat (limited to 'render.c')
| -rw-r--r-- | render.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -385,7 +385,7 @@ render_cell(struct terminal *term, pixman_image_t *pix, int x = term->x_margin + col * width; int y = term->y_margin + row * height; - //bool is_selected = coord_is_selected(term, col, row); + assert(cell->attrs.selected == 0 || cell->attrs.selected == 1); bool is_selected = cell->attrs.selected; uint32_t _fg = 0; |
