diff options
author | Michael Davis | 2024-01-25 05:10:58 +0000 |
---|---|---|
committer | GitHub | 2024-01-25 05:10:58 +0000 |
commit | cda8ea991e885a84f03d7ffcf4cf046bfbf77490 (patch) | |
tree | 4f81073d5de76a628ed58a0ad5ea027ffbb3b0c6 /helix-core | |
parent | 83f09ecbff5160e4350c8099be1ad4c64513f665 (diff) |
highlighting: Gate multiple captures behind `#is-not? local` predicates (#9390)
Diffstat (limited to 'helix-core')
-rw-r--r-- | helix-core/src/syntax.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/helix-core/src/syntax.rs b/helix-core/src/syntax.rs index e543df06..a5a85c57 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 { |