From a2b489730926344f7e22e0da652720e7902d1e1e Mon Sep 17 00:00:00 2001 From: xianjimli Date: Tue, 21 Apr 2020 12:24:15 +0800 Subject: [PATCH] fix text_edit_preedit_clear --- src/base/text_edit.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/base/text_edit.c b/src/base/text_edit.c index 7634f570d..49ea44efb 100644 --- a/src/base/text_edit.c +++ b/src/base/text_edit.c @@ -1320,6 +1320,7 @@ ret_t text_edit_preedit_clear(text_edit_t* text_edit) { if (impl->preedit_chars_nr > 0) { text_edit_remove(text_edit, impl->state.cursor - impl->preedit_chars_nr, impl->preedit_chars_nr); + impl->state.cursor = impl->state.cursor - impl->preedit_chars_nr; impl->preedit_chars_nr = 0; }