Extend symbol ranges by their annotation range when suggesting edits (#15677)
Release Notes: - N/A --------- Co-authored-by: Nathan <nathan@zed.dev>
This commit is contained in:
parent
e4608e7f12
commit
b88b9dcdd1
7 changed files with 261 additions and 121 deletions
|
@ -3646,6 +3646,12 @@ impl MultiBufferSnapshot {
|
|||
..self.anchor_in_excerpt(*excerpt_id, body_range.end)?,
|
||||
)
|
||||
}),
|
||||
annotation_range: item.annotation_range.and_then(|annotation_range| {
|
||||
Some(
|
||||
self.anchor_in_excerpt(*excerpt_id, annotation_range.start)?
|
||||
..self.anchor_in_excerpt(*excerpt_id, annotation_range.end)?,
|
||||
)
|
||||
}),
|
||||
})
|
||||
})
|
||||
.collect(),
|
||||
|
@ -3681,6 +3687,12 @@ impl MultiBufferSnapshot {
|
|||
..self.anchor_in_excerpt(excerpt_id, body_range.end)?,
|
||||
)
|
||||
}),
|
||||
annotation_range: item.annotation_range.and_then(|body_range| {
|
||||
Some(
|
||||
self.anchor_in_excerpt(excerpt_id, body_range.start)?
|
||||
..self.anchor_in_excerpt(excerpt_id, body_range.end)?,
|
||||
)
|
||||
}),
|
||||
})
|
||||
})
|
||||
.collect(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue