Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
vim: Fix replace in helix select mode (#57553)
liame7bbfd522303
diff --git a/crates/vim/src/helix.rs b/crates/vim/src/helix.rsindex ad5cd37e3fe..b1ce35431c5 100644--- a/crates/vim/src/helix.rs+++ b/crates/vim/src/helix.rs@@ -2482,6 +2482,12 @@ mod test {cx.simulate_keystrokes("r x");cx.assert_state("«xxˇ»", Mode::HelixNormal);++ cx.set_state("«aaˇ»", Mode::HelixSelect);++ cx.simulate_keystrokes("r x");++ cx.assert_state("«xxˇ»", Mode::HelixNormal);}#[gpui::test]diff --git a/crates/vim/src/vim.rs b/crates/vim/src/vim.rsindex 678b30d8ad3..e956e585687 100644--- a/crates/vim/src/vim.rs+++ b/crates/vim/src/vim.rs@@ -2066,7 +2066,7 @@ impl Vim {Mode::Visual | Mode::VisualLine | Mode::VisualBlock => {self.visual_replace(text, window, cx)}- Mode::HelixNormal => self.helix_replace(&text, window, cx),+ Mode::HelixNormal | Mode::HelixSelect => self.helix_replace(&text, window, cx),_ => self.clear_operator(window, cx),},Some(Operator::Digraph { first_char }) => {