Skip to content

Commit 4a740cc

Browse files
committed
Cleanup
1 parent 628b92f commit 4a740cc

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

kitty/line.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -559,13 +559,14 @@ line_get_char(Line *self, index_type at) {
559559

560560
void
561561
line_set_char(Line *self, unsigned int at, uint32_t ch, unsigned int width, Cursor *cursor, bool UNUSED is_second) {
562+
GPUCell *g = self->gpu_cells + at;
562563
if (cursor == NULL) {
563-
self->gpu_cells[at].attrs = (self->gpu_cells[at].attrs & ATTRS_MASK_WITHOUT_WIDTH) | width;
564+
g->attrs = (self->gpu_cells[at].attrs & ATTRS_MASK_WITHOUT_WIDTH) | width;
564565
} else {
565-
self->gpu_cells[at].attrs = CURSOR_TO_ATTRS(cursor, width & WIDTH_MASK);
566-
self->gpu_cells[at].fg = (cursor->fg & COL_MASK);
567-
self->gpu_cells[at].bg = (cursor->bg & COL_MASK);
568-
self->gpu_cells[at].decoration_fg = cursor->decoration_fg & COL_MASK;
566+
g->attrs = CURSOR_TO_ATTRS(cursor, width & WIDTH_MASK);
567+
g->fg = cursor->fg & COL_MASK;
568+
g->bg = cursor->bg & COL_MASK;
569+
g->decoration_fg = cursor->decoration_fg & COL_MASK;
569570
}
570571
self->cpu_cells[at].ch = ch;
571572
memset(self->cpu_cells[at].cc_idx, 0, sizeof(self->cpu_cells[at].cc_idx));

0 commit comments

Comments
 (0)