highlighting: Gate multiple captures behind #is-not? local predicates (#9390)

This commit is contained in:
Michael Davis 2024-01-25 00:10:58 -05:00 committed by GitHub
parent 83f09ecbff
commit cda8ea991e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2306,6 +2306,7 @@ fn next(&mut self) -> Option<Self::Item> {
// 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 {