@@ -340,6 +340,20 @@ impl EditorView {
340 Box::new(highlights)
340 Box::new(highlights)
343+ // diagnostic injection
344+ let diagnostic_scope = theme.find_scope_index("diagnostic").unwrap_or(cursor_scope);
351+ diagnostic.range.start..diagnostic.range.end,
355+ let highlights = Box::new(merge(highlights, spans_));
343 'outer: for event in highlights {
357 'outer: for event in highlights {
344 match event {
358 match event {
345 HighlightEvent::HighlightStart(span) => {
359 HighlightEvent::HighlightStart(span) => {
@@ -412,18 +426,6 @@ impl EditorView {
412 continue;
426 continue;
415− // ugh,interleave highlight spans with diagnostic spans
416− let is_diagnostic = doc.diagnostics().iter().any(|diagnostic| {
417− diagnostic.range.start <= char_index
418− && diagnostic.range.end > char_index
421− let style = if is_diagnostic {
422− style.add_modifier(Modifier::UNDERLINED)
427 surface.set_string(
429 surface.set_string(
428 viewport.x + visual_x - view.first_col as u16,
430 viewport.x + visual_x - view.first_col as u16,
429 viewport.y + line,
431 viewport.y + line,