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.

Fix diagnostic popover not overflowing when necessary (#14322)

Stanislav Alekseev11178eacc797
diff --git a/crates/editor/src/hover_popover.rs b/crates/editor/src/hover_popover.rs
index 8f179f8fdba..2c95a764db7 100644
--- a/crates/editor/src/hover_popover.rs
+++ b/crates/editor/src/hover_popover.rs
@@ -636,8 +636,6 @@ impl DiagnosticPopover {
.when(window_is_transparent(cx), |this| {
this.bg(gpui::transparent_black())
})
- .max_w(max_size.width)
- .max_h(max_size.height)
.cursor(CursorStyle::PointingHand)
.tooltip(move |cx| Tooltip::for_action("Go To Diagnostic", &crate::GoToDiagnostic, cx))
// Prevent a mouse move on the popover from being propagated to the editor,
@@ -651,6 +649,8 @@ impl DiagnosticPopover {
div()
.id("diagnostic-inner")
.overflow_y_scroll()
+ .max_w(max_size.width)
+ .max_h(max_size.height)
.px_2()
.py_1()
.bg(diagnostic_colors.background)