Fix more panics when removing excerpts (#28836)
Release Notes: - Fixed a panic when an excerpt removed has an edit suggestion inlay in it --------- Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
This commit is contained in:
parent
0d8f77b5de
commit
486a9e4d61
5 changed files with 26 additions and 8 deletions
|
@ -71,7 +71,7 @@ impl Anchor {
|
|||
if self_excerpt_id == ExcerptId::min() || self_excerpt_id == ExcerptId::max() {
|
||||
return Ordering::Equal;
|
||||
}
|
||||
if let Some(excerpt) = snapshot.excerpt(self.excerpt_id) {
|
||||
if let Some(excerpt) = snapshot.excerpt(self_excerpt_id) {
|
||||
let text_cmp = self.text_anchor.cmp(&other.text_anchor, &excerpt.buffer);
|
||||
if text_cmp.is_ne() {
|
||||
return text_cmp;
|
||||
|
|
|
@ -6041,7 +6041,7 @@ impl MultiBufferSnapshot {
|
|||
return &entry.locator;
|
||||
}
|
||||
}
|
||||
panic!("invalid excerpt id {:?}", id)
|
||||
panic!("invalid excerpt id {id:?}")
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue