aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src/ui
diff options
context:
space:
mode:
authorSeth Bromberger2022-06-22 18:53:36 +0000
committerGitHub2022-06-22 18:53:36 +0000
commitc107f4ea49edd61a3c6e8b971b20604cdab96325 (patch)
tree4595ca1a2e61d973e7fe0eb8990e4f4294be01c6 /helix-term/src/ui
parent301065fe4d062dacc2b23b0f55780b3b6f2f52b5 (diff)
fixes #2856 by resetting style on diagnostic (#2861)
Diffstat (limited to 'helix-term/src/ui')
-rw-r--r--helix-term/src/ui/editor.rs16
1 files changed, 7 insertions, 9 deletions
diff --git a/helix-term/src/ui/editor.rs b/helix-term/src/ui/editor.rs
index dc6362c6..debce9b4 100644
--- a/helix-term/src/ui/editor.rs
+++ b/helix-term/src/ui/editor.rs
@@ -665,15 +665,13 @@ impl EditorView {
let mut lines = Vec::new();
for diagnostic in diagnostics {
- let text = Text::styled(
- &diagnostic.message,
- 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(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);
}