From 0a5df7d597bc662d44df049669de42f404dfeaec 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 cf3ded128574774b9d59af0eae1d918090aac5bc..de39ef61cc981dae8356423048c6fc6bbcc9d99a 100644 --- a/crates/gpui/src/platform.rs +++ b/crates/gpui/src/platform.rs @@ -413,10 +413,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); } }