Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

vim fixes for find&replace (#2995)

Conrad Irwinf4d4a2f41b4e
diff --cc crates/search/src/buffer_search.rs
index eb15146314a,f9dc181f719..142b548a934
--- a/crates/search/src/buffer_search.rs
+++ b/crates/search/src/buffer_search.rs
@@@ -921,14 -922,12 +922,13 @@@ impl BufferSearchBar
.get(&searchable_item.downgrade())
{
if let Some(active_index) = self.active_match_index {
- let query = query.as_ref().clone().with_replacement(
- Some(self.replacement(cx)).filter(|rep| !rep.is_empty()),
- );
+ let query = query
+ .as_ref()
+ .clone()
+ .with_replacement(self.replacement(cx));
searchable_item.replace(&matches[active_index], &query, cx);
+ self.select_next_match(&SelectNextMatch, cx);
}
-
- self.focus_editor(&FocusEditor, cx);
}
}
}