Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Restore zed1 behavior for buffer search deploy
Kirill Bulatov4bfe46f53a6e
diff --git a/crates/search2/src/buffer_search.rs b/crates/search2/src/buffer_search.rsindex 45495e50270..5db7aff7367 100644--- a/crates/search2/src/buffer_search.rs+++ b/crates/search2/src/buffer_search.rs@@ -338,7 +338,9 @@ impl BufferSearchBar {pane.update(cx, |this, cx| {this.toolbar().update(cx, |this, cx| {if let Some(search_bar) = this.item_of_type::<BufferSearchBar>() {- search_bar.update(cx, |this, cx| this.toggle(deploy, cx));+ search_bar.update(cx, |this, cx| {+ this.deploy(deploy, cx);+ });return;}let view = cx.build_view(|cx| BufferSearchBar::new(cx));@@ -1483,9 +1485,9 @@ mod tests {search_bar.select_all_matches(&SelectAllMatches, cx);});assert!(- editor.update(cx, |this, cx| !this.is_focused(cx.window_context())),- "Should not switch focus to editor if SelectAllMatches does not find any matches"- );+ editor.update(cx, |this, cx| !this.is_focused(cx.window_context())),+ "Should not switch focus to editor if SelectAllMatches does not find any matches"+ );search_bar.update(cx, |search_bar, cx| {let all_selections =editor.update(cx, |editor, cx| editor.selections.display_ranges(cx));@@ -1651,6 +1653,7 @@ mod tests {assert_eq!(search_bar.search_options, SearchOptions::NONE);});}+#[gpui::test]async fn test_replace_simple(cx: &mut TestAppContext) {let (editor, search_bar, cx) = init_test(cx);