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: Fix signature hover popover incorrect width instead of adapting to its content (#30646)

Stanislav Alekseev1ace5a27bcad
diff --git a/crates/editor/src/element.rs b/crates/editor/src/element.rs
index df77ee0f504..19c2ce311f6 100644
--- a/crates/editor/src/element.rs
+++ b/crates/editor/src/element.rs
@@ -4451,7 +4451,7 @@ impl EditorElement {
let target_y = selection_row.as_f32() * line_height - scroll_pixel_position.y;
let target_point = content_origin + point(target_x, target_y);
- let actual_size = element.layout_as_root(max_size.into(), window, cx);
+ let actual_size = element.layout_as_root(Size::<AvailableSpace>::default(), window, cx);
let overall_height = actual_size.height + HOVER_POPOVER_GAP;
let popover_origin = if target_point.y > overall_height {