Do not render multibuffer without matches

This commit is contained in:
Piotr Osiewicz
2023-12-07 17:55:03 +01:00
parent e9c40963ab
commit 1bf94f0251
+8 -4
View File
@@ -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 {