Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'helix-view/src/annotations/diagnostics.rs')
-rw-r--r--helix-view/src/annotations/diagnostics.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/helix-view/src/annotations/diagnostics.rs b/helix-view/src/annotations/diagnostics.rs
index dc141462..2f698c4e 100644
--- a/helix-view/src/annotations/diagnostics.rs
+++ b/helix-view/src/annotations/diagnostics.rs
@@ -1,10 +1,10 @@
use helix_core::diagnostic::Severity;
use helix_core::doc_formatter::{FormattedGrapheme, TextFormat};
use helix_core::text_annotations::LineAnnotation;
-use helix_core::{softwrapped_dimensions, Diagnostic, Position};
+use helix_core::{softwrapped_dimensions, Position};
use serde::{Deserialize, Serialize};
-use crate::Document;
+use crate::{document::Diagnostic, Document};
/// Describes the severity level of a [`Diagnostic`].
#[derive(Debug, Clone, Copy, Eq, PartialEq, PartialOrd, Ord)]
@@ -109,7 +109,7 @@ impl InlineDiagnosticsConfig {
impl Default for InlineDiagnosticsConfig {
fn default() -> Self {
InlineDiagnosticsConfig {
- cursor_line: DiagnosticFilter::Enable(Severity::Warning),
+ cursor_line: DiagnosticFilter::Disable,
other_lines: DiagnosticFilter::Disable,
min_diagnostic_width: 40,
prefix_len: 1,
@@ -186,7 +186,7 @@ impl<'a> InlineDiagnosticAccumulator<'a> {
.doc
.diagnostics
.get(self.idx)
- .is_none_or(|diag| diag.range.start != grapheme.char_idx)
+ .map_or(true, |diag| diag.range.start != grapheme.char_idx)
{
return false;
}
@@ -305,7 +305,7 @@ impl LineAnnotation for InlineDiagnostics<'_> {
.drain(..)
.map(|(diag, anchor)| {
let text_fmt = self.state.config.text_fmt(anchor, self.width);
- softwrapped_dimensions(diag.message.as_str().trim().into(), &text_fmt).0
+ softwrapped_dimensions(diag.inner.message.as_str().trim().into(), &text_fmt).0
})
.sum();
Position::new(multi as usize + diagostic_height, 0)