From c3920b806b896b246bd91dcf3bd3ac4bbe151457 Mon Sep 17 00:00:00 2001 From: Finn Evers Date: Mon, 28 Jul 2025 21:07:58 +0200 Subject: [PATCH] editor: Ensure code actions menu doesn't grow beyond its max size (#35211) This resolves the same issue as fixed by https://github.com/zed-industries/zed/pull/34939/commits/d295409f0fc9c1ccd5e06e91c1c5365e96f16486 for the code actions menu. No release notes since this only occurs on Nightly. Release Notes: - N/A --- crates/editor/src/code_context_menus.rs | 2 +- crates/ui/src/components/popover.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/editor/src/code_context_menus.rs b/crates/editor/src/code_context_menus.rs index 52446ceafcaa47dc3e26ac4ee0684645df4bd99a..9f842836ed20bb960c1e112398b8939d6f77e6cc 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 24460f6d9ce8e28b80c1e345007a88e7ee21a7a9..7143514c5269baf6dba2802f96e59ec0f8634317 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(