mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-22 08:18:08 +02:00
Avoid a double call for mark functions
This commit is contained in:
12
kitty/line.c
12
kitty/line.c
@@ -665,6 +665,18 @@ __eq__(Line *a, Line *b) {
|
||||
return a->xnum == b->xnum && memcmp(a->cpu_cells, b->cpu_cells, sizeof(CPUCell) * a->xnum) == 0 && memcmp(a->gpu_cells, b->gpu_cells, sizeof(GPUCell) * a->xnum) == 0;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
mark_text_in_line(Marker *markers, size_t markers_count, Line *line) {
|
||||
if (!markers_count) {
|
||||
for (index_type i = 0; i < line->xnum; i++) {
|
||||
line->gpu_cells[i].attrs &= ATTRS_MASK_WITHOUT_MARK;
|
||||
}
|
||||
return;
|
||||
}
|
||||
(void)markers;
|
||||
}
|
||||
|
||||
// Boilerplate {{{
|
||||
static PyObject*
|
||||
copy_char(Line* self, PyObject *args);
|
||||
|
||||
Reference in New Issue
Block a user