aboutsummaryrefslogtreecommitdiff
path: root/helix-core/src/match_brackets.rs
diff options
context:
space:
mode:
Diffstat (limited to 'helix-core/src/match_brackets.rs')
-rw-r--r--helix-core/src/match_brackets.rs8
1 files changed, 6 insertions, 2 deletions
diff --git a/helix-core/src/match_brackets.rs b/helix-core/src/match_brackets.rs
index 7fda6d7e..f6d9885e 100644
--- a/helix-core/src/match_brackets.rs
+++ b/helix-core/src/match_brackets.rs
@@ -106,12 +106,16 @@ fn find_pair(
for close in
iter::successors(node.next_sibling(), |node| node.next_sibling()).take(MATCH_LIMIT)
{
- let Some(open) = as_close_pair(doc, &close) else { continue; };
+ let Some(open) = as_close_pair(doc, &close) else {
+ continue;
+ };
if find_pair_end(doc, Some(node), open, Backward).is_some() {
return doc.try_byte_to_char(close.start_byte()).ok();
}
}
- let Some(parent) = node.parent() else { break; };
+ let Some(parent) = node.parent() else {
+ break;
+ };
node = parent;
}
let node = tree.root_node().named_descendant_for_byte_range(pos, pos)?;