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
…es (#9390)
  • Loading branch information
the-mikedavis authored Jan 25, 2024
1 parent 83f09ec commit cda8ea9
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 cda8ea9

Please sign in to comment.