From ab818ed89f14d5d50c563c404d5d04138fa874d8 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 6 Aug 2018 11:30:33 +0530 Subject: [PATCH] IBUS: Fix update of pre-edit text not working correctly Fixes #793 --- kitty/lineops.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/kitty/lineops.h b/kitty/lineops.h index b642b4faa..3347d78e6 100644 --- a/kitty/lineops.h +++ b/kitty/lineops.h @@ -43,14 +43,14 @@ xlimit_for_line(Line *line) { static inline void line_save_cells(Line *line, index_type start, index_type num, GPUCell *gpu_cells, CPUCell *cpu_cells) { - memcpy(gpu_cells + sizeof(GPUCell) * start, line->gpu_cells + sizeof(GPUCell) * start, sizeof(GPUCell) * num); - memcpy(cpu_cells + sizeof(CPUCell) * start, line->cpu_cells + sizeof(CPUCell) * start, sizeof(CPUCell) * num); + memcpy(gpu_cells + start, line->gpu_cells + start, sizeof(GPUCell) * num); + memcpy(cpu_cells + start, line->cpu_cells + start, sizeof(CPUCell) * num); } static inline void line_reset_cells(Line *line, index_type start, index_type num, GPUCell *gpu_cells, CPUCell *cpu_cells) { - memcpy(line->gpu_cells + sizeof(GPUCell) * start, gpu_cells + sizeof(GPUCell) * start, sizeof(GPUCell) * num); - memcpy(line->cpu_cells + sizeof(CPUCell) * start, cpu_cells + sizeof(CPUCell) * start, sizeof(CPUCell) * num); + memcpy(line->gpu_cells + start, gpu_cells + start, sizeof(GPUCell) * num); + memcpy(line->cpu_cells + start, cpu_cells + start, sizeof(CPUCell) * num); } void line_clear_text(Line *self, unsigned int at, unsigned int num, char_type ch);