Start on adding support for editing via the assistant panel (#14795)

Note that this shouldn't have any visible user-facing behavior yet. The
feature is incomplete but we wanna merge early to avoid a long-running
branch.

Release Notes:

- N/A

---------

Co-authored-by: Nathan <nathan@zed.dev>
This commit is contained in:
Antonio ScandurraandNathan authored and GitHub committed 2024-07-19 11:13:15 +02:00
1 parent 42acfe86b3
commit 0862ad5f8e
44 files changed
+1999 -968

No files matched your search

+12
View File
@@ -3639,6 +3639,12 @@ impl MultiBufferSnapshot {
text: item.text,
highlight_ranges: item.highlight_ranges,
name_ranges: item.name_ranges,
body_range: item.body_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(),
@@ -3668,6 +3674,12 @@ impl MultiBufferSnapshot {
text: item.text,
highlight_ranges: item.highlight_ranges,
name_ranges: item.name_ranges,
body_range: item.body_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(),