fixes #2856 by resetting style on diagnostic (#2861)

This commit is contained in:
Seth Bromberger 2022-06-22 11:53:36 -07:00 committed by GitHub
parent 301065fe4d
commit c107f4ea49
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -665,15 +665,13 @@ impl EditorView {
let mut lines = Vec::new();
for diagnostic in diagnostics {
let text = Text::styled(
&diagnostic.message,
match diagnostic.severity {
let style = Style::reset().patch(match diagnostic.severity {
Some(Severity::Error) => error,
Some(Severity::Warning) | None => warning,
Some(Severity::Info) => info,
Some(Severity::Hint) => hint,
},
);
});
let text = Text::styled(&diagnostic.message, style);
lines.extend(text.lines);
}