aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax/src/algo.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_syntax/src/algo.rs')
-rw-r--r--crates/ra_syntax/src/algo.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ra_syntax/src/algo.rs b/crates/ra_syntax/src/algo.rs
index e2de5e0e3..f47e11e66 100644
--- a/crates/ra_syntax/src/algo.rs
+++ b/crates/ra_syntax/src/algo.rs
@@ -25,7 +25,7 @@ pub fn ancestors_at_offset(
25) -> impl Iterator<Item = SyntaxNode> { 25) -> impl Iterator<Item = SyntaxNode> {
26 find_token_at_offset(node, offset) 26 find_token_at_offset(node, offset)
27 .map(|token| token.parent().ancestors()) 27 .map(|token| token.parent().ancestors())
28 .kmerge_by(|node1, node2| node1.range().len() < node2.range().len()) 28 .kmerge_by(|node1, node2| node1.text_range().len() < node2.text_range().len())
29} 29}
30 30
31/// Finds a node of specific Ast type at offset. Note that this is slightly 31/// Finds a node of specific Ast type at offset. Note that this is slightly