Fix panic when a file in a path-based multibuffer excerpt is renamed (#28364)

Closes #ISSUE

Release Notes:

- Fixed a panic that could occur when paths changed in the project diff.

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
This commit is contained in:
Cole Miller
2025-04-08 22:01:40 +00:00
committed by GitHub
co-authored by Conrad Irwin
parent 246013cfc2
commit 0459b1d303
3 changed files with 105 additions and 20 deletions
+1
View File
@@ -2231,6 +2231,7 @@ impl BufferSnapshot {
} else if *anchor == Anchor::MAX {
self.visible_text.len()
} else {
debug_assert!(anchor.buffer_id == Some(self.remote_id));
let anchor_key = InsertionFragmentKey {
timestamp: anchor.timestamp,
split_offset: anchor.offset,