We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 10f2109 commit a0c20a5Copy full SHA for a0c20a5
winit-appkit/src/view.rs
@@ -390,9 +390,11 @@ define_class!(
390
391
let is_control = string.chars().next().is_some_and(|c| c.is_control());
392
393
- // Commit only if we have marked text.
394
- if self.hasMarkedText() && self.is_ime_enabled() && !is_control {
395
- self.queue_event(WindowEvent::Ime(Ime::Preedit(String::new(), None)));
+ if self.ivars().ime_capabilities.get().is_some() && !is_control {
+ if self.hasMarkedText() {
+ // clear preedit only if we have marked text.
396
+ self.queue_event(WindowEvent::Ime(Ime::Preedit(String::new(), None)));
397
+ }
398
self.queue_event(WindowEvent::Ime(Ime::Commit(string)));
399
self.ivars().ime_state.set(ImeState::Committed);
400
}
0 commit comments