multi_buffer: Remap excerpt ids to latest excerpt in excerpt fetching (#44229)

Closes #ISSUE

Release Notes:

- N/A *or* Added/Fixed/Improved ...

Co-authored by: Cole Miller <cole@zed.dev>
This commit is contained in:
Lukas Wirth
2025-12-05 18:20:29 +00:00
committed by GitHub
parent d76dd86272
commit 37b0cdf94b
3 changed files with 16 additions and 7 deletions
+1 -1
View File
@@ -305,7 +305,7 @@ impl MultiBuffer {
let snapshot = self.snapshot(cx);
let mut next_excerpt_id =
// is this right? What if we remove the last excerpt, then we might reallocate with a wrong mapping?
// todo(lw): is this right? What if we remove the last excerpt, then we might reallocate with a wrong mapping?
if let Some(last_entry) = self.snapshot.borrow().excerpt_ids.last() {
last_entry.id.0 + 1
} else {