on master help sign in
Render diagnostics in the file picker preview (#4324)
c47ca33Michael Davis
helix-term/src/ui/picker.rs+7−1
@@ -248,8 +248,14 @@ impl<T: Item + 'static> Component for FilePicker<T> {
248
248
249 let offset = Position::new(first_line, 0);
249 let offset = Position::new(first_line, 0);
250
250
251− let highlights =
251+ let mut highlights =
252 EditorView::doc_syntax_highlights(doc, offset, area.height, &cx.editor.theme);
252 EditorView::doc_syntax_highlights(doc, offset, area.height, &cx.editor.theme);
253+ for spans in EditorView::doc_diagnostics_highlights(doc, &cx.editor.theme) {
254+ if spans.is_empty() {
255+ continue;
256+ }
257+ highlights = Box::new(helix_core::syntax::merge(highlights, spans));
258+ }
253 EditorView::render_text_highlights(
259 EditorView::render_text_highlights(
254 doc,
260 doc,
255 offset,
261 offset,