diff options
author | Seth Bromberger | 2022-06-28 14:59:10 +0000 |
---|---|---|
committer | GitHub | 2022-06-28 14:59:10 +0000 |
commit | 07e7a13a9e6b0a6c0bb456504b62572ec6be9eb2 (patch) | |
tree | add40379d982f704d923423eb6095f59de0ecc60 /helix-term/src/ui | |
parent | 030de46e6b9568f27fd89b1543d978b21da7464e (diff) |
fixes background reset (#2900)
* fixes background reset
* moves creation of default style out of loop
* patches with background_style
* removes commented code
Diffstat (limited to 'helix-term/src/ui')
-rw-r--r-- | helix-term/src/ui/editor.rs | 15 |
1 files changed, 9 insertions, 6 deletions
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); } |