diff options
Diffstat (limited to 'helix-core/src/indent.rs')
-rw-r--r-- | helix-core/src/indent.rs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/helix-core/src/indent.rs b/helix-core/src/indent.rs index 88ab09b5..8ccc0120 100644 --- a/helix-core/src/indent.rs +++ b/helix-core/src/indent.rs @@ -194,10 +194,7 @@ fn get_highest_syntax_node_at_bytepos(syntax: &Syntax, pos: usize) -> Option<Nod let tree = syntax.tree(); // named_descendant - let mut node = match tree.root_node().descendant_for_byte_range(pos, pos) { - Some(node) => node, - None => return None, - }; + let mut node = tree.root_node().descendant_for_byte_range(pos, pos)?; while let Some(parent) = node.parent() { if parent.start_byte() == node.start_byte() { |