mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 13:51:31 +00:00
generalize extend selection to work with nodes
This commit is contained in:
parent
a3ee07ac14
commit
f1e8ebfbeb
3 changed files with 22 additions and 21 deletions
|
@ -102,7 +102,7 @@ fn selections(file: &SourceFileNode, start: u32, end: u32) -> String {
|
|||
let mut cur = Some(TextRange::from_to((start - 1).into(), (end - 1).into()));
|
||||
while let Some(r) = cur {
|
||||
ranges.push(r);
|
||||
cur = extend_selection(&file, r);
|
||||
cur = extend_selection(file.syntax(), r);
|
||||
}
|
||||
let ranges = ranges
|
||||
.iter()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue