Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
windows: Fix crash in vim normal mode when IME key is pressed (#11387)
CharlesChen0823530bc5c99e8f
diff --git a/crates/gpui/src/platform/windows/window.rs b/crates/gpui/src/platform/windows/window.rsindex 9aa44989a9c..7c0738c4a16 100644--- a/crates/gpui/src/platform/windows/window.rs+++ b/crates/gpui/src/platform/windows/window.rs@@ -790,8 +790,7 @@ impl WindowsWindowInner {let Some(mut input_handler) = self.input_handler.take() else {return Some(1);};- // we are composing, this should never fail- let caret_range = input_handler.selected_text_range().unwrap();+ let caret_range = input_handler.selected_text_range().unwrap_or_default();let caret_position = input_handler.bounds_for_range(caret_range).unwrap();self.input_handler.set(Some(input_handler));let scale_factor = self.scale_factor.get();