ime: use correct index when calculating number of *cells* to advance

This commit is contained in:
Daniel Eklöf 2020-12-03 18:39:53 +01:00
parent 83d3ae10ae
commit cc76f91c43
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

2
ime.c
View file

@ -269,7 +269,7 @@ done(void *data, struct zwp_text_input_v3 *zwp_text_input_v3,
break;
byte_idx += wc_bytes;
cell_idx += max(wcwidth(term->ime.preedit.cells[wc_idx].wc), 1);
cell_idx += max(wcwidth(term->ime.preedit.cells[cell_idx].wc), 1);
wc_idx++;
}