Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/syntax/src/algo.rs')
-rw-r--r--crates/syntax/src/algo.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/syntax/src/algo.rs b/crates/syntax/src/algo.rs
index 817625f879..8b14789dd9 100644
--- a/crates/syntax/src/algo.rs
+++ b/crates/syntax/src/algo.rs
@@ -22,7 +22,7 @@ pub fn ancestors_at_offset(
offset: TextSize,
) -> impl Iterator<Item = SyntaxNode> {
node.token_at_offset(offset)
- .map(|token| token.ancestors())
+ .map(|token| token.parent_ancestors())
.kmerge_by(|node1, node2| node1.text_range().len() < node2.text_range().len())
}