fix text_edit_preedit_clear

This commit is contained in:
xianjimli 2020-04-21 12:24:15 +08:00
parent b7882bdf7f
commit a2b4897309

View File

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