Fix anchor_in_excerpt on replaced excerpts (#28880)

Release Notes:

- N/A
This commit is contained in:
Conrad Irwin 2025-04-16 12:35:40 -06:00 committed by GitHub
parent 7c7f69f4c5
commit 7bdde8f14f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -5170,6 +5170,7 @@ impl MultiBufferSnapshot {
excerpt_id: ExcerptId,
text_anchor: text::Anchor,
) -> Option<Anchor> {
let excerpt_id = self.latest_excerpt_id(excerpt_id);
let locator = self.excerpt_locator_for_id(excerpt_id);
let mut cursor = self.excerpts.cursor::<Option<&Locator>>(&());
cursor.seek(locator, Bias::Left, &());