Fix diagnostic popups not having a max width (#16092)

Stanislav Alekseev created

They were probably broken by #14518 

Release Notes:

- N/A

Change summary

crates/editor/src/hover_popover.rs | 2 ++
1 file changed, 2 insertions(+)

Detailed changes

crates/editor/src/hover_popover.rs 🔗

@@ -733,6 +733,8 @@ impl DiagnosticPopover {
             .id("diagnostic")
             .block()
             .max_h(max_size.height)
+            .overflow_y_scroll()
+            .max_w(max_size.width)
             .elevation_2_borderless(cx)
             // Don't draw the background color if the theme
             // allows transparent surfaces.