diff options
author | chtenb | 2023-11-22 02:42:40 +0000 |
---|---|---|
committer | GitHub | 2023-11-22 02:42:40 +0000 |
commit | 41b307b673a34183123585d63746cb756c1779ed (patch) | |
tree | 840b665c060d496a44b421880218a4882f153fbb /helix-term/src/ui/picker.rs | |
parent | 47b6c4bc78d449e3586f28d26507bfc8fb8608e2 (diff) |
Fix precedence of ui.virtual.whitespace (#8750)
Diffstat (limited to 'helix-term/src/ui/picker.rs')
-rw-r--r-- | helix-term/src/ui/picker.rs | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/helix-term/src/ui/picker.rs b/helix-term/src/ui/picker.rs index 0214a391..9ba45335 100644 --- a/helix-term/src/ui/picker.rs +++ b/helix-term/src/ui/picker.rs @@ -736,17 +736,20 @@ impl<T: Item + 'static> Picker<T> { } } - let mut highlights = EditorView::doc_syntax_highlights( + let syntax_highlights = EditorView::doc_syntax_highlights( doc, offset.anchor, area.height, &cx.editor.theme, ); + + let mut overlay_highlights = + EditorView::empty_highlight_iter(doc, offset.anchor, area.height); for spans in EditorView::doc_diagnostics_highlights(doc, &cx.editor.theme) { if spans.is_empty() { continue; } - highlights = Box::new(helix_core::syntax::merge(highlights, spans)); + overlay_highlights = Box::new(helix_core::syntax::merge(overlay_highlights, spans)); } let mut decorations: Vec<Box<dyn LineDecoration>> = Vec::new(); @@ -777,7 +780,8 @@ impl<T: Item + 'static> Picker<T> { offset, // TODO: compute text annotations asynchronously here (like inlay hints) &TextAnnotations::default(), - highlights, + syntax_highlights, + overlay_highlights, &cx.editor.theme, &mut decorations, &mut [], |