diff options
author | Wojciech Kępka | 2021-06-06 09:59:32 +0000 |
---|---|---|
committer | Blaž Hrastnik | 2021-06-07 00:11:52 +0000 |
commit | 16b1cfa3be2665e78bea6c876d3ced96dbfeb44f (patch) | |
tree | 08abe1f4a6a4c2b9286ce226498792e014ac050f /helix-term/src/ui/editor.rs | |
parent | 2066e866c739fec210df85534b9fbc1de02c155b (diff) |
Add diagnostics keybindings
Diffstat (limited to 'helix-term/src/ui/editor.rs')
-rw-r--r-- | helix-term/src/ui/editor.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/helix-term/src/ui/editor.rs b/helix-term/src/ui/editor.rs index 2464528c..f47d6c26 100644 --- a/helix-term/src/ui/editor.rs +++ b/helix-term/src/ui/editor.rs @@ -195,7 +195,7 @@ impl EditorView { } // ugh,interleave highlight spans with diagnostic spans - let is_diagnostic = doc.diagnostics.iter().any(|diagnostic| { + let is_diagnostic = doc.diagnostics().iter().any(|diagnostic| { diagnostic.range.start <= char_index && diagnostic.range.end > char_index }); @@ -343,7 +343,7 @@ impl EditorView { for (i, line) in (view.first_line..=last_line).enumerate() { use helix_core::diagnostic::Severity; - if let Some(diagnostic) = doc.diagnostics.iter().find(|d| d.line == line) { + if let Some(diagnostic) = doc.diagnostics().iter().find(|d| d.line == line) { surface.set_stringn( viewport.x - OFFSET, viewport.y + i as u16, @@ -387,7 +387,7 @@ impl EditorView { let cursor = doc.selection(view.id).cursor(); let line = doc.text().char_to_line(cursor); - let diagnostics = doc.diagnostics.iter().filter(|diagnostic| { + let diagnostics = doc.diagnostics().iter().filter(|diagnostic| { diagnostic.range.start <= cursor && diagnostic.range.end >= cursor }); @@ -469,7 +469,7 @@ impl EditorView { surface.set_stringn( viewport.x + viewport.width.saturating_sub(15), viewport.y, - format!("{}", doc.diagnostics.len()), + format!("{}", doc.diagnostics().len()), 4, text_color, ); |