on master help sign in
fixes background reset (#2900)

* fixes background reset * moves creation of default style out of loop * patches with background_style * removes commented code

commit07e7a13a9e6b0a6c0bb456504b62572ec6be9eb2 authorSeth Bromberger <sbromberger@users.noreply.github.com> dateTue 28 Jun 2022, 10:59 (4 years ago) parent030de46
1 file changed+9−6
helix-term/src/ui/editor.rs+9−6
helix-term/src/ui/editor.rs+9−6
@@ -668,13 +668,16 @@ impl EditorView {
668668 let hint = theme.get("hint");
669669
670670 let mut lines = Vec::new();
671+ let background_style = theme.get("ui.background");
671672 for diagnostic in diagnostics {
672− let style = Style::reset().patch(match diagnostic.severity {
673− Some(Severity::Error) => error,
674− Some(Severity::Warning) | None => warning,
675− Some(Severity::Info) => info,
676− Some(Severity::Hint) => hint,
677− });
673+ let style = Style::reset()
674+ .patch(background_style)
675+ .patch(match diagnostic.severity {
676+ Some(Severity::Error) => error,
677+ Some(Severity::Warning) | None => warning,
678+ Some(Severity::Info) => info,
679+ Some(Severity::Hint) => hint,
680+ });
678681 let text = Text::styled(&diagnostic.message, style);
679682 lines.extend(text.lines);
680683 }