Allow multiple disjoint nodes to be captured as matcheable in the outline query

This commit is contained in:
Max Brunsfeld 2022-01-13 14:04:25 -08:00
parent 950b06674f
commit 3e1c559b2d
8 changed files with 181 additions and 58 deletions

View file

@ -1707,12 +1707,11 @@ impl MultiBufferSnapshot {
.items
.into_iter()
.map(|item| OutlineItem {
id: item.id,
depth: item.depth,
range: self.anchor_in_excerpt(excerpt_id.clone(), item.range.start)
..self.anchor_in_excerpt(excerpt_id.clone(), item.range.end),
text: item.text,
name_range_in_text: item.name_range_in_text,
name_ranges: item.name_ranges,
})
.collect(),
))