aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src/ui/picker.rs
diff options
context:
space:
mode:
authorchtenb2023-11-25 13:27:31 +0000
committerGitHub2023-11-25 13:27:31 +0000
commit8c68074fa6d2e3771bbc1a7f80bc9b422a787da4 (patch)
tree4e21374d6f9b96827ecdae4599568b4701388ff2 /helix-term/src/ui/picker.rs
parent8b0ae3d27912799d59e4948ff11d3a5428e32ce4 (diff)
Fix precedence of ui.virtual.whitespace (#8879)
* Revert "Revert "Fix precedence of ui.virtual.whitespace (#8750)"" This reverts commit 811d62d3b3699efb7b7ceb362f537979e5911871. * Fix ui.text overwriting the syntax highlighting Adjust ui.text description
Diffstat (limited to 'helix-term/src/ui/picker.rs')
-rw-r--r--helix-term/src/ui/picker.rs10
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 [],