Skip to content

Commit

Permalink
highlighting: Gate multiple captures behind #is-not? local predicat…
Browse files Browse the repository at this point in the history
  • Loading branch information
the-mikedavis authored and Vulpesx committed Jun 7, 2024
1 parent a7e2ba9 commit 3d22b5b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions helix-core/src/syntax.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 3d22b5b

Please sign in to comment.