Fix innermost brackets panic (#32120)

Release Notes:

- Fixed a few rare panics that could happen when a multibuffer excerpt
started with expanded deleted content.
This commit is contained in:
Conrad Irwin 2025-06-05 14:24:56 -06:00 committed by GitHub
parent 7aa70a4858
commit 4b297a9967
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 17 additions and 1 deletions

View file

@ -6227,7 +6227,7 @@ impl MultiBufferSnapshot {
cursor.seek_to_start_of_current_excerpt();
let region = cursor.region()?;
let offset = region.range.start;
let buffer_offset = region.buffer_range.start;
let buffer_offset = start_excerpt.buffer_start_offset();
let excerpt_offset = cursor.excerpts.start().clone();
Some(MultiBufferExcerpt {
diff_transforms: cursor.diff_transforms,