diff --git a/crates/egui/src/widgets/text_edit/builder.rs b/crates/egui/src/widgets/text_edit/builder.rs index 12077b93..3c4f6c51 100644 --- a/crates/egui/src/widgets/text_edit/builder.rs +++ b/crates/egui/src/widgets/text_edit/builder.rs @@ -953,7 +953,10 @@ fn events( if prediction != "\n" && prediction != "\r" { state.has_ime = false; let mut ccursor; - if !prediction.is_empty() && cursor_range == state.ime_cursor_range { + if !prediction.is_empty() + && cursor_range.secondary.ccursor.index + == state.ime_cursor_range.secondary.ccursor.index + { ccursor = text.delete_selected(&cursor_range); text.insert_text_at(&mut ccursor, prediction, char_limit); } else {