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.

pickers: Remove `picker::ToMultiBuffer` action we did not land (#60979)

Yara 🏳️‍⚧️3e7681382571
diff --git a/crates/picker/src/picker.rs b/crates/picker/src/picker.rs
index f3c8b0a2684..9f8baac0cba 100644
--- a/crates/picker/src/picker.rs
+++ b/crates/picker/src/picker.rs
@@ -76,8 +76,6 @@ actions!(
SetPreviewHidden,
/// Opens the footer's actions menu.
ToggleActionsMenu,
- /// Take the picker's content and open it in a multibuffer
- ToMultiBuffer,
/// Toggles multi-select mode, in which clicking items adds them to
/// the selection instead of opening them
ToggleMultiSelect,
diff --git a/crates/picker_preview/src/picker_preview.rs b/crates/picker_preview/src/picker_preview.rs
index eb4e179171c..3870dc36901 100644
--- a/crates/picker_preview/src/picker_preview.rs
+++ b/crates/picker_preview/src/picker_preview.rs
@@ -3,13 +3,11 @@
use std::sync::Arc;
use gpui::{
- Action, AnyElement, App, AppContext as _, Context, Entity, IntoElement, Pixels, StyledText,
- Task, Window, px,
+ AnyElement, App, AppContext as _, Context, Entity, IntoElement, Pixels, StyledText, Task,
+ Window, px,
};
use language::{Bias, Buffer, HighlightedText, HighlightedTextBuilder, ToPoint};
-use picker::{
- MatchLocation, PreviewBackend, PreviewLayout, PreviewSource, PreviewUpdate, ToMultiBuffer,
-};
+use picker::{MatchLocation, PreviewBackend, PreviewLayout, PreviewSource, PreviewUpdate};
use project::{Project, Symbol};
use rope::Point;
use settings::Settings;
@@ -335,7 +333,7 @@ impl EditorPreview {
div()
.flex_1()
.overflow_hidden()
- .child(self.editor_as_giant_button())
+ .child(self.occluded_editor())
.into_any_element()
}
}
@@ -357,7 +355,7 @@ impl EditorPreview {
.child(content)
}
- fn editor_as_giant_button(&self) -> impl IntoElement {
+ fn occluded_editor(&self) -> impl IntoElement {
div()
.relative()
.size_full()
@@ -367,10 +365,7 @@ impl EditorPreview {
.id("picker-preview-editor")
.absolute()
.inset_0()
- .occlude()
- .on_click(|_, window, cx| {
- window.dispatch_action(ToMultiBuffer.boxed_clone(), cx);
- }),
+ .occlude(),
)
}
}