Only show the first line of diagnostic messages in the status bar

Nathan Sobo and Max Brunsfeld created

Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>

Change summary

crates/workspace/src/items.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Detailed changes

crates/workspace/src/items.rs 🔗

@@ -300,7 +300,7 @@ impl View for DiagnosticMessage {
                 )
                 .with_child(
                     Label::new(
-                        diagnostic.message.replace('\n', " "),
+                        diagnostic.message.lines().next().unwrap().to_string(),
                         theme.diagnostic_message.clone(),
                     )
                     .boxed(),