Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
solo_diff_view: Hide multibuffer controls in solo diffs (#61998)
Sathwik Chirivelli5e03f2d387e6
diff --git a/crates/search/src/buffer_search.rs b/crates/search/src/buffer_search.rsindex a379847295f..83a0575c42b 100644--- a/crates/search/src/buffer_search.rs+++ b/crates/search/src/buffer_search.rs@@ -951,7 +951,7 @@ impl BufferSearchBar {}fn deployed_toolbar_location(&self, cx: &App) -> ToolbarItemLocation {- if self.needs_expand_collapse_option(cx) && !self.uses_hidden_splittable_editor(cx) {+ if self.needs_expand_collapse_option(cx) {ToolbarItemLocation::PrimaryLeft} else {ToolbarItemLocation::Secondary@@ -976,10 +976,11 @@ impl BufferSearchBar {// We provide an expand/collapse button if we are in a multibuffer// and not doing a project search.fn needs_expand_collapse_option(&self, cx: &App) -> bool {- self.active_searchable_item.as_ref().is_some_and(|item| {- item.buffer_kind(cx) == ItemBufferKind::Multibuffer- && !item.supported_options(cx).find_in_results- })+ !self.uses_hidden_splittable_editor(cx)+ && self.active_searchable_item.as_ref().is_some_and(|item| {+ item.buffer_kind(cx) == ItemBufferKind::Multibuffer+ && !item.supported_options(cx).find_in_results+ })}fn toggle_fold_all(&mut self, _: &ToggleFoldAll, window: &mut Window, cx: &mut Context<Self>) {