fixes background reset (#2900)

* fixes background reset

* moves creation of default style out of loop

* patches with background_style

* removes commented code
pull/2906/head
Seth Bromberger 2 years ago committed by GitHub
parent 030de46e6b
commit 07e7a13a9e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -668,13 +668,16 @@ impl EditorView {
let hint = theme.get("hint");
let mut lines = Vec::new();
let background_style = theme.get("ui.background");
for diagnostic in diagnostics {
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 style = Style::reset()
.patch(background_style)
.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);
}

Loading…
Cancel
Save