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 <conrad@zed.dev>
This commit is contained in:
Thorsten Ball 2024-02-19 18:21:07 +01:00 committed by GitHub
parent 4d1585b917
commit 0a5df7d597
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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);
}
}