From 552b9884b905fc136e368344da313eabe7bad858 Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Thu, 3 Dec 2020 18:40:18 +0100 Subject: ime: set cursor end correctly when it ends *after* the pre-edit string --- ime.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ime.c b/ime.c index 970efc81..67718517 100644 --- a/ime.c +++ b/ime.c @@ -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); -- cgit v1.3