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.

editor: Ensure code actions menu doesn't grow beyond its max size (#35211)

Finn Eversc3920b806b89
diff --git a/crates/editor/src/code_context_menus.rs b/crates/editor/src/code_context_menus.rs
index 52446ceafca..9f842836ed2 100644
--- a/crates/editor/src/code_context_menus.rs
+++ b/crates/editor/src/code_context_menus.rs
@@ -844,7 +844,7 @@ impl CompletionsMenu {
.with_sizing_behavior(ListSizingBehavior::Infer)
.w(rems(34.));
- Popover::new().child(div().child(list)).into_any_element()
+ Popover::new().child(list).into_any_element()
}
fn render_aside(
diff --git a/crates/ui/src/components/popover.rs b/crates/ui/src/components/popover.rs
index 24460f6d9ce..7143514c526 100644
--- a/crates/ui/src/components/popover.rs
+++ b/crates/ui/src/components/popover.rs
@@ -50,7 +50,7 @@ impl RenderOnce for Popover {
v_flex()
.elevation_2(cx)
.py(POPOVER_Y_PADDING / 2.)
- .children(self.children),
+ .child(div().children(self.children)),
)
.when_some(self.aside, |this, aside| {
this.child(