Skip to content

Commit

Permalink
fixes background reset (#2900)
Browse files Browse the repository at this point in the history
* fixes background reset

* moves creation of default style out of loop

* patches with background_style

* removes commented code
  • Loading branch information
sbromberger authored Jun 28, 2022
1 parent 030de46 commit 07e7a13
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions helix-term/src/ui/editor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 07e7a13

Please sign in to comment.