mirror of
https://github.com/Myriad-Dreamin/tinymist.git
synced 2025-11-23 20:56:42 +00:00
fix: adjust leaf_at usages
This commit is contained in:
parent
e7c5bf7c43
commit
7f839e6319
3 changed files with 3 additions and 3 deletions
|
|
@ -16,7 +16,7 @@ impl SelectionRangeRequest {
|
|||
for position in self.positions {
|
||||
let typst_offset = lsp_to_typst::position(position, position_encoding, &source)?;
|
||||
let tree = LinkedNode::new(source.root());
|
||||
let leaf = tree.leaf_at(typst_offset)?;
|
||||
let leaf = tree.leaf_at(typst_offset + 1)?;
|
||||
ranges.push(range_for_node(&source, position_encoding, &leaf));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue