mirror of https://github.com/helix-editor/helix
parent
a2b22ec152
commit
35ac815409
|
@ -22,7 +22,8 @@ pub fn diagnostic<'doc>(
|
||||||
|
|
||||||
Box::new(move |line: usize, _selected: bool, out: &mut String| {
|
Box::new(move |line: usize, _selected: bool, out: &mut String| {
|
||||||
use helix_core::diagnostic::Severity;
|
use helix_core::diagnostic::Severity;
|
||||||
if let Some(diagnostic) = diagnostics.binary_search_by_key(&line, |d| d.line) {
|
if let Ok(index) = diagnostics.binary_search_by_key(&line, |d| d.line) {
|
||||||
|
let diagnostic = &diagnostics[index];
|
||||||
write!(out, "●").unwrap();
|
write!(out, "●").unwrap();
|
||||||
return Some(match diagnostic.severity {
|
return Some(match diagnostic.severity {
|
||||||
Some(Severity::Error) => error,
|
Some(Severity::Error) => error,
|
||||||
|
|
Loading…
Reference in New Issue