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.

Do not render multibuffer without matches

Piotr Osiewicz1bf94f025169
diff --git a/crates/search2/src/project_search.rs b/crates/search2/src/project_search.rs
index b2144587be8..18c101088bb 100644
--- a/crates/search2/src/project_search.rs
+++ b/crates/search2/src/project_search.rs
@@ -324,10 +324,14 @@ impl EventEmitter<ViewEvent> for ProjectSearchView {}
impl Render for ProjectSearchView {
type Element = Div;
fn render(&mut self, cx: &mut ViewContext<Self>) -> Self::Element {
- div()
- .flex_1()
- .size_full()
- .child(self.results_editor.clone())
+ if self.has_matches() {
+ div()
+ .flex_1()
+ .size_full()
+ .child(self.results_editor.clone())
+ } else {
+ div()
+ }
}
}
// impl Entity for ProjectSearchView {