diff --git a/crates/gpui/src/platform/linux/x11/client.rs b/crates/gpui/src/platform/linux/x11/client.rs index b9ebf6a7dfe290e8d7e2bb2284388fb171bb3828..92dd3273ceea84e74f7a4a386c2830ab60975946 100644 --- a/crates/gpui/src/platform/linux/x11/client.rs +++ b/crates/gpui/src/platform/linux/x11/client.rs @@ -947,18 +947,16 @@ impl X11Client { fn xim_handle_commit(&self, window: xproto::Window, text: String) -> Option<()> { let window = self.get_window(window).unwrap(); let mut state = self.0.borrow_mut(); - if !state.composing { - if let Some(keystroke) = state.pre_ime_key_down.take() { - drop(state); - window.handle_input(PlatformInput::KeyDown(crate::KeyDownEvent { - keystroke, - is_held: false, - })); - return Some(()); - } - } + let keystroke = state.pre_ime_key_down.take(); state.composing = false; drop(state); + if let Some(mut keystroke) = keystroke { + keystroke.ime_key = Some(text.clone()); + window.handle_input(PlatformInput::KeyDown(crate::KeyDownEvent { + keystroke, + is_held: false, + })); + } window.handle_ime_commit(text); Some(())