ime: set cursor end correctly when it ends *after* the pre-edit string

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

3
ime.c
View file

@ -273,6 +273,9 @@ done(void *data, struct zwp_text_input_v3 *zwp_text_input_v3,
wc_idx++;
}
if (seat->ime.preedit.pending.cursor_end >= byte_len)
cell_end = cell_count;
/* Bounded by number of screen columns */
cell_begin = min(max(cell_begin, 0), cell_count - 1);