From c3ed945a93f6ca2b56dfd25d7558f951be49e15a Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 7 Feb 2025 21:04:00 +0530 Subject: [PATCH] Another micro optimization --- kitty/screen.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/kitty/screen.c b/kitty/screen.c index d15be2672..82bd3b77a 100644 --- a/kitty/screen.c +++ b/kitty/screen.c @@ -1843,9 +1843,8 @@ screen_tab(Screen *self) { if (!found) found = self->columns - 1; if (found != self->cursor->x) { if (self->cursor->x < self->columns) { - linebuf_init_line(self->linebuf, self->cursor->y); + CPUCell *cpu_cell = linebuf_cpu_cells_for_line(self->linebuf, self->cursor->y) + self->cursor->x; combining_type diff = found - self->cursor->x; - CPUCell *cpu_cell = self->linebuf->line->cpu_cells + self->cursor->x; bool ok = true; for (combining_type i = 0; i < diff; i++) { CPUCell *c = cpu_cell + i;