diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2020-01-04 11:03:04 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2020-01-04 11:03:04 +0000 |
| commit | f12b1473fde2045d38750aa1051ad624e0fea2bc (patch) | |
| tree | 18409bac197e47d3b67aef35bc449a4b1755d00b /terminal.h | |
| parent | render: coord_is_selected: handle block selections (diff) | |
selection: store cell 'selected' state in the cells' attributes
Instead of having the renderer calculate, for each cell, whether that
cell is currently selected or not, make selection_update() mark/unmark
the selected cells.
The renderer now only has to look at the cells' 'selected'
attribute. This makes the renderer both smaller and faster.
Diffstat (limited to 'terminal.h')
| -rw-r--r-- | terminal.h | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -41,7 +41,8 @@ struct attributes { uint32_t clean:1; uint32_t have_fg:1; uint32_t have_bg:1; - uint32_t reserved:5; + uint32_t selected:1; + uint32_t reserved:4; uint32_t bg:24; }; static_assert(sizeof(struct attributes) == 8, "bad size"); |
