From 07e7a13a9e6b0a6c0bb456504b62572ec6be9eb2 Mon Sep 17 00:00:00 2001 From: Seth Bromberger Date: Tue, 28 Jun 2022 10:59:10 -0400 Subject: fixes background reset (#2900) * fixes background reset * moves creation of default style out of loop * patches with background_style * removes commented code--- helix-term/src/ui/editor.rs | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'helix-term/src') diff --git a/helix-term/src/ui/editor.rs b/helix-term/src/ui/editor.rs index 32f70c8b..948803eb 100644 --- a/helix-term/src/ui/editor.rs +++ b/helix-term/src/ui/editor.rs @@ -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); } -- cgit v1.2.3-70-g09d2