Fix prefix/suffix calculation when determining copilot suggestion
Co-Authored-By: Nathan Sobo <nathan@zed.dev> Co-Authored-By: Mikayla Maki <mikayla@zed.dev>
This commit is contained in:
parent
b588ba1435
commit
5f579a4287
3 changed files with 30 additions and 20 deletions
|
@ -2933,6 +2933,10 @@ impl MultiBufferSnapshot {
|
|||
Some(self.excerpt(excerpt_id)?.buffer_id)
|
||||
}
|
||||
|
||||
pub fn buffer_for_excerpt(&self, excerpt_id: ExcerptId) -> Option<&BufferSnapshot> {
|
||||
Some(&self.excerpt(excerpt_id)?.buffer)
|
||||
}
|
||||
|
||||
fn excerpt<'a>(&'a self, excerpt_id: ExcerptId) -> Option<&'a Excerpt> {
|
||||
let mut cursor = self.excerpts.cursor::<Option<&Locator>>();
|
||||
let locator = self.excerpt_locator_for_id(excerpt_id);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue