From 33900345b0e05ccb6dd1a429769b2c47fc5e0531 Mon Sep 17 00:00:00 2001 From: Thorsten Ball Date: Mon, 19 Feb 2024 18:21:07 +0100 Subject: [PATCH] Fix `jk` not working in Vim bindings (#8023) Fixes #8006. Release Notes: - Fixed two-character bindings in Vim insert mode (e.g. `j k` or `j j`) not working. ([#8006](https://github.com/zed-industries/zed/issues/8006)) Co-authored-by: Conrad --- crates/gpui/src/platform.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/crates/gpui/src/platform.rs b/crates/gpui/src/platform.rs index 6739fee6fc39ce86c86e86b6292a6e1f6490546b..b43dea938c831ab8e35b4f65d02ce736e5655aaa 100644 --- a/crates/gpui/src/platform.rs +++ b/crates/gpui/src/platform.rs @@ -407,10 +407,7 @@ impl PlatformInputHandler { } pub(crate) fn flush_pending_input(&mut self, input: &str, cx: &mut WindowContext) { - let Some(range) = self.handler.selected_text_range(cx) else { - return; - }; - self.handler.replace_text_in_range(Some(range), input, cx); + self.handler.replace_text_in_range(None, input, cx); } }