on master help sign in
Display error code only if not none
a43bcc8Gokul Soumya
helix-term/src/commands/lsp.rs+2−3
@@ -125,6 +125,7 @@ impl ui::menu::Item for PickerDiagnostic {
125 NumberOrString::Number(n) => n.to_string(),
125 NumberOrString::Number(n) => n.to_string(),
126 NumberOrString::String(s) => s.to_string(),
126 NumberOrString::String(s) => s.to_string(),
127 })
127 })
128+ .map(|code| format!(" ({})", code))
128 .unwrap_or_default();
129 .unwrap_or_default();
129
130
130 let truncated_path = path::get_truncated_path(self.url.path())
131 let truncated_path = path::get_truncated_path(self.url.path())
@@ -135,9 +136,7 @@ impl ui::menu::Item for PickerDiagnostic {
135 Span::raw(truncated_path),
136 Span::raw(truncated_path),
136 Span::raw(": "),
137 Span::raw(": "),
137 Span::styled(&self.diag.message, style),
138 Span::styled(&self.diag.message, style),
138− Span::raw(" ("),
139− Span::styled(code, style.add_modifier(Modifier::BOLD)),
139+ Span::styled(code, style),
140− Span::raw(")"),
141 ])
140 ])
142 }
141 }
143}
142}