From e30a9a059c2c226b6376ba523aff05c9ec581b23 Mon Sep 17 00:00:00 2001 From: GNUSheep Date: Mon, 19 Aug 2024 16:20:41 +0200 Subject: [PATCH] Fix syntax highlighting not updating --- helix-term/src/ui/picker.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/helix-term/src/ui/picker.rs b/helix-term/src/ui/picker.rs index cbb098113..b964f76e6 100644 --- a/helix-term/src/ui/picker.rs +++ b/helix-term/src/ui/picker.rs @@ -963,10 +963,9 @@ impl Picker { Direction::Backward => offset.anchor.saturating_sub(preview_scroll_offset.1), Direction::Forward => offset.anchor.saturating_add(preview_scroll_offset.1), }; - let syntax_highlights = EditorView::doc_syntax_highlights( doc, - offset.anchor, + doc.text().slice(..).line_to_char(offset.vertical_offset), area.height, &cx.editor.theme, );