Unnamed repository; edit this file 'description' to name the repository.
| -rw-r--r-- | helix-core/src/match_brackets.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/helix-core/src/match_brackets.rs b/helix-core/src/match_brackets.rs index 6f8997e5..e1e40e0d 100644 --- a/helix-core/src/match_brackets.rs +++ b/helix-core/src/match_brackets.rs @@ -93,7 +93,7 @@ fn find_pair( if let (Some((start_pos, open)), Some((end_pos, close))) = (as_char(doc, &open), as_char(doc, &close)) { - if PAIRS.contains(&(open, close)) { + if PAIRS.contains(&(open, close)) && start_pos <= pos_ && pos_ <= end_pos { if end_pos == pos_ { return Some(start_pos); } |