diff --git a/helix-term/src/ui/picker.rs b/helix-term/src/ui/picker.rs index 374d3f018..b5cba13bd 100644 --- a/helix-term/src/ui/picker.rs +++ b/helix-term/src/ui/picker.rs @@ -970,8 +970,11 @@ impl Picker { &cx.editor.theme, ); - let mut overlay_highlights = - EditorView::empty_highlight_iter(doc, offset.anchor, area.height); + let mut overlay_highlights = EditorView::empty_highlight_iter( + doc, + doc.text().slice(..).line_to_char(offset.vertical_offset), + area.height, + ); for spans in EditorView::doc_diagnostics_highlights(doc, &cx.editor.theme) { if spans.is_empty() { continue;