@@ -1216,7 +1216,6 @@ pub struct Editor {
accent_data: Option<AccentData>,
fetched_tree_sitter_chunks: HashMap<ExcerptId, HashSet<Range<BufferRow>>>,
use_base_text_line_numbers: bool,
- is_multibuffer_collapsed: bool,
}
#[derive(Debug, PartialEq)]
@@ -2407,7 +2406,6 @@ impl Editor {
accent_data: None,
fetched_tree_sitter_chunks: HashMap::default(),
use_base_text_line_numbers: false,
- is_multibuffer_collapsed: false,
};
if is_minimap {
@@ -1,7 +1,7 @@
use crate::{
Anchor, Autoscroll, BufferSerialization, Editor, EditorEvent, EditorSettings, ExcerptId,
ExcerptRange, FormatTarget, MultiBuffer, MultiBufferSnapshot, NavigationData,
- ReportEditorEvent, SearchWithinRange, SelectionEffects, ToPoint as _, ToggleFoldAll,
+ ReportEditorEvent, SearchWithinRange, SelectionEffects, ToPoint as _,
display_map::HighlightKey,
editor_settings::SeedQuerySetting,
persistence::{DB, SerializedEditor},
@@ -39,7 +39,7 @@ use std::{
};
use text::{BufferId, BufferSnapshot, Selection};
use theme::Theme;
-use ui::{IconDecorationKind, Tooltip, prelude::*};
+use ui::{IconDecorationKind, prelude::*};
use util::{ResultExt, TryFutureExt, paths::PathExt};
use workspace::{
CollaboratorId, ItemId, ItemNavHistory, ToolbarItemLocation, ViewId, Workspace, WorkspaceId,
@@ -9,7 +9,7 @@ use buffer_diff::{BufferDiff, DiffHunkSecondaryStatus};
use collections::{HashMap, HashSet};
use editor::{
Addon, Editor, EditorEvent, SelectionEffects, SplittableEditor,
- actions::{GoToHunk, GoToPreviousHunk, ToggleFoldAll},
+ actions::{GoToHunk, GoToPreviousHunk},
multibuffer_context_lines,
scroll::Autoscroll,
};
@@ -41,7 +41,7 @@ use util::{ResultExt as _, rel_path::RelPath};
use workspace::{
CloseActiveItem, ItemNavHistory, SerializableItem, ToolbarItemEvent, ToolbarItemLocation,
ToolbarItemView, Workspace,
- item::{BreadcrumbText, Item, ItemEvent, ItemHandle, SaveOptions, TabContentParams},
+ item::{Item, ItemEvent, ItemHandle, SaveOptions, TabContentParams},
notifications::NotifyTaskExt,
searchable::SearchableItemHandle,
};
@@ -70,7 +70,6 @@ pub struct ProjectDiff {
workspace: WeakEntity<Workspace>,
focus_handle: FocusHandle,
pending_scroll: Option<PathKey>,
- is_collapsed: bool,
_task: Task<Result<()>>,
_subscription: Subscription,
}
@@ -330,7 +329,6 @@ impl ProjectDiff {
focus_handle,
editor,
multibuffer,
- is_collapsed: false,
buffer_diff_subscriptions: Default::default(),
pending_scroll: None,
_task: task,
@@ -912,61 +910,6 @@ impl Item for ProjectDiff {
}
}
- fn breadcrumb_prefix(
- &self,
- _window: &mut Window,
- cx: &mut Context<Self>,
- ) -> Option<gpui::AnyElement> {
- let is_collapsed = self.is_collapsed;
-
- let (icon, label, tooltip_label) = if is_collapsed {
- (
- IconName::ChevronUpDown,
- "Expand All",
- "Expand All Search Results",
- )
- } else {
- (
- IconName::ChevronDownUp,
- "Collapse All",
- "Collapse All Search Results",
- )
- };
-
- let focus_handle = self.editor.focus_handle(cx);
-
- Some(
- Button::new("multibuffer-collapse-expand", label)
- .icon(icon)
- .icon_position(IconPosition::Start)
- .icon_size(IconSize::Small)
- .tooltip(move |_, cx| {
- Tooltip::for_action_in(tooltip_label, &ToggleFoldAll, &focus_handle, cx)
- })
- .on_click(cx.listener(|this, _, window, cx| {
- this.is_collapsed = !this.is_collapsed;
- this.editor.update(cx, |splittable, cx| {
- splittable.last_selected_editor().update(cx, |editor, cx| {
- editor.toggle_fold_all(&ToggleFoldAll, window, cx);
- })
- })
- }))
- .into_any_element(),
- )
- }
-
- fn breadcrumb_location(&self, _: &App) -> ToolbarItemLocation {
- ToolbarItemLocation::Hidden
- }
-
- fn breadcrumbs(&self, theme: &theme::Theme, cx: &App) -> Option<Vec<BreadcrumbText>> {
- self.editor
- .read(cx)
- .last_selected_editor()
- .read(cx)
- .breadcrumbs(theme, cx)
- }
-
fn added_to_workspace(
&mut self,
workspace: &mut Workspace,