# Fix crash when following into a multibuffer with recent edits \(\#55948\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/4339b65ce61955c3c0675cd90e82010891d9bd9a)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 4339b65ce61955c3c0675cd90e82010891d9bd9a

Requested commit: 4339b65ce61955c3c0675cd90e82010891d9bd9a

Commit: 4339b65ce61955c3c0675cd90e82010891d9bd9a

Tree: f4f312efd8617e957c1d3d2e297b6b705eac5fce

Author: Agus Zubiaga

Committer: GitHub

## Message

```
Fix crash when following into a multibuffer with recent edits (#55948)

A follower could crash when following another collaborator into a
newly-opened multibuffer if the leader's recent edits hadn't yet
propagated. The follower would receive the view state with excerpt
anchors pointing into still-unobserved edits, tripping
`panic_bad_anchor`.

The fix waits for each buffer to observe the anchors timestamps before
resolving them, matching what's already done for selection and scroll
anchors. Includes a regression test in `collab` that reproduces the race
deterministically.

Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Release Notes:

- Fixed a crash in follow mode when opening multibuffers
```

## Parents

- [0de588c0c9a2582ca9029023534d34850e3dc6f4](https://git.cafe/gitcafe/zed/commit/0de588c0c9a2582ca9029023534d34850e3dc6f4?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/4339b65ce61955c3c0675cd90e82010891d9bd9a?format=markdown)
