diff options
Diffstat (limited to 'helix-core/src')
-rw-r--r-- | helix-core/src/match_brackets.rs | 8 | ||||
-rw-r--r-- | helix-core/src/transaction.rs | 5 |
2 files changed, 10 insertions, 3 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)?; diff --git a/helix-core/src/transaction.rs b/helix-core/src/transaction.rs index fec62578..1cea6911 100644 --- a/helix-core/src/transaction.rs +++ b/helix-core/src/transaction.rs @@ -389,7 +389,10 @@ impl ChangeSet { } let Some((i, change)) = iter.next() else { - map!(|pos, _| (old_pos == pos).then_some(new_pos), self.changes.len()); + map!( + |pos, _| (old_pos == pos).then_some(new_pos), + self.changes.len() + ); break; }; |