Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
vim: Change into visual mode on select all matches (#24897)
Dino294dea10e89e
diff --git a/crates/editor/src/items.rs b/crates/editor/src/items.rsindex a643be3b57f..3077c079376 100644--- a/crates/editor/src/items.rs+++ b/crates/editor/src/items.rs@@ -1401,11 +1401,9 @@ impl SearchableItem for Editor {cx: &mut Context<Self>,) {self.unfold_ranges(matches, false, false, cx);- let mut ranges = Vec::new();- for m in matches {- ranges.push(self.range_for_match(m))- }- self.change_selections(None, window, cx, |s| s.select_ranges(ranges));+ self.change_selections(None, window, cx, |s| {+ s.select_ranges(matches.iter().cloned())+ });}fn replace(&mut self,