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.

Trim diagnostic messages to fix rendering bug

Thorsten Ballf8939fd859fa
diff --git a/crates/project/src/project.rs b/crates/project/src/project.rs
index de69a93ba6f..88655c7fdc8 100644
--- a/crates/project/src/project.rs
+++ b/crates/project/src/project.rs
@@ -3906,7 +3906,7 @@ impl Project {
source: diagnostic.source.clone(),
code: code.clone(),
severity: diagnostic.severity.unwrap_or(DiagnosticSeverity::ERROR),
- message: diagnostic.message.clone(),
+ message: diagnostic.message.trim().to_string(),
group_id,
is_primary: true,
is_disk_based,
@@ -3923,7 +3923,7 @@ impl Project {
source: diagnostic.source.clone(),
code: code.clone(),
severity: DiagnosticSeverity::INFORMATION,
- message: info.message.clone(),
+ message: info.message.trim().to_string(),
group_id,
is_primary: false,
is_disk_based,