From 2c1cc01b81d61dd1cc84dd0cd53739de25b01c80 Mon Sep 17 00:00:00 2001 From: Smit Barmase Date: Mon, 6 Oct 2025 18:22:02 +0530 Subject: [PATCH] linux: Fix enter key triggering newline instead of commiting input (#39599) Closes #31337 #35537 Release Notes: - Fixed an issue on Linux X11 where pressing Enter added a new line instead of confirming English input. --- crates/gpui/src/platform/linux/x11/client.rs | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/crates/gpui/src/platform/linux/x11/client.rs b/crates/gpui/src/platform/linux/x11/client.rs index e6af7c0d17a54223ecee7a9801eb7a1e59fd6a1a..481f99b0c1de22d14a9f8e8b4eedac36b6fdd692 100644 --- a/crates/gpui/src/platform/linux/x11/client.rs +++ b/crates/gpui/src/platform/linux/x11/client.rs @@ -1315,17 +1315,9 @@ impl X11Client { return None; }; let mut state = self.0.borrow_mut(); - let keystroke = state.pre_key_char_down.take(); state.composing = false; drop(state); - if let Some(mut keystroke) = keystroke { - keystroke.key_char = Some(text); - window.handle_input(PlatformInput::KeyDown(crate::KeyDownEvent { - keystroke, - is_held: false, - })); - } - + window.handle_ime_commit(text); Some(()) }