Skip to content

Commit

Permalink
Fix: Backspace not working after IME input (emilk#4912)
Browse files Browse the repository at this point in the history
Fix: Changed the handling method of `Ime::Preedit(_, None)`

Fix: backspace fail after ime input

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

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

Changed the handling method of `Ime::Preedit(_, None)`
  • Loading branch information
rustbasic authored and 486c committed Oct 9, 2024
1 parent 6d2c796 commit ecda6d3
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions crates/egui-winit/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)) => {
Expand All @@ -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();
}
};
Expand Down

0 comments on commit ecda6d3

Please sign in to comment.