IBUS: Fix update of pre-edit text not working correctly

Fixes #793
This commit is contained in:
Kovid Goyal 2018-08-06 11:30:33 +05:30
parent 1bb6540b64
commit ab818ed89f
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -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);