1
0
mirror of https://github.com/emilk/egui.git synced 2026-06-26 22:53:14 -04:00

Fix: Backspace not working after IME input (#4912)

Fix: Changed the handling method of `Ime::Preedit(_, None)`

Fix: backspace fail after ime input

* Related #4358
* Related #4430 
* Related #4436
* Related #4794 
* Related #4896
* Closes #4908 

Issues: backspace fail after ime input
* #4908 (Chinese)

Changed the handling method of `Ime::Preedit(_, None)`
This commit is contained in:
rustbasic
2024-08-05 18:09:51 +09:00
committed by GitHub
parent 71dbc48818
commit 76fe6c855b

View File

@@ -341,8 +341,7 @@ impl State {
// We use input_method_editor_started to manually insert CompositionStart
// between Commits.
match ime {
winit::event::Ime::Enabled => {}
winit::event::Ime::Preedit(_, None) => {
winit::event::Ime::Enabled => {
self.ime_event_enable();
}
winit::event::Ime::Preedit(text, Some(_cursor)) => {
@@ -357,7 +356,7 @@ impl State {
.push(egui::Event::Ime(egui::ImeEvent::Commit(text.clone())));
self.ime_event_disable();
}
winit::event::Ime::Disabled => {
winit::event::Ime::Disabled | winit::event::Ime::Preedit(_, None) => {
self.ime_event_disable();
}
};