From 4b0b3efc6ce46fc7d611ee18f0f010b1606f3a46 Mon Sep 17 00:00:00 2001 From: Michael Davis Date: Thu, 25 Jan 2024 00:10:58 -0500 Subject: [PATCH] highlighting: Gate multiple captures behind `#is-not? local` predicates (#9390) --- helix-core/src/syntax.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/helix-core/src/syntax.rs b/helix-core/src/syntax.rs index e543df06e3759..a5a85c575ae3e 100644 --- a/helix-core/src/syntax.rs +++ b/helix-core/src/syntax.rs @@ -2306,6 +2306,7 @@ impl<'a> Iterator for HighlightIter<'a> { // highlighting patterns that are disabled for local variables. if definition_highlight.is_some() || reference_highlight.is_some() { while layer.config.non_local_variable_patterns[match_.pattern_index] { + match_.remove(); if let Some((next_match, next_capture_index)) = captures.peek() { let next_capture = next_match.captures[*next_capture_index]; if next_capture.node == capture.node {