mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-26 18:22:09 +02:00
Rip out the old sprite update code
This commit is contained in:
@@ -8,18 +8,6 @@
|
||||
|
||||
#include "data-types.h"
|
||||
|
||||
static inline void
|
||||
update_sprites_in_line(Cell *cells, index_type xnum) {
|
||||
if (LIKELY(xnum > 0)) {
|
||||
if (CHAR_IS_BLANK(cells->ch)) { clear_sprite_position(cells[0]); }
|
||||
else set_sprite_position(cells, NULL);
|
||||
for (index_type i = 1; i < xnum; i++) {
|
||||
if (CHAR_IS_BLANK(cells[i].ch)) { clear_sprite_position(cells[i]); }
|
||||
else set_sprite_position(cells + i, cells + i - 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static inline void
|
||||
set_attribute_on_line(Cell *cells, uint32_t shift, uint32_t val, index_type xnum) {
|
||||
// Set a single attribute on all cells in the line
|
||||
@@ -27,7 +15,6 @@ set_attribute_on_line(Cell *cells, uint32_t shift, uint32_t val, index_type xnum
|
||||
attrs_type aval = (val & mask) << shift;
|
||||
mask = ~(mask << shift);
|
||||
for (index_type i = 0; i < xnum; i++) cells[i].attrs = (cells[i].attrs & mask) | aval;
|
||||
if (shift == BOLD_SHIFT || shift == ITALIC_SHIFT) update_sprites_in_line(cells, xnum);
|
||||
}
|
||||
|
||||
static inline void
|
||||
|
||||
Reference in New Issue
Block a user