Fix some overcomputation in the project diff (#57859)

- Don't emit unnecessary edited events from the multibuffer when setting
excerpts is a no-op
- Limit excerpt recomputation in the project diff when diffs or
conflicts change to just the affected buffer
- Ignore diff events in the project diff that can't affect excerpt
boundaries

Also includes some drive-by improvements to the handling of merge
conflicts:
- Await initial conflicts parse when opening a conflict set (like
diffs), so we don't see an initial incorrect "no conflicts" state
- Make the project diff subscribe to conflicts directly instead of
indirecting through the editor (also like diffs)
- Instead of saving the affected buffer when resolving a conflict, just
avoid re-registering dirty buffers with the project diff, so that
excerpts for conflicts don't disappear quite so eagerly (once more: like
diffs)

The combination of these changes greatly cuts down the amount of time
spent syncing the `DisplayMap`, which is especially bad for the split
view.

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)
- [ ] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Release Notes:

- Improved the performance of the project diff, especially in the
presence of merge conflicts
- Fixed conflicts disappearing too quickly from the project diff when
editing
- Fixed conflicts sometimes taking a while to appear in the project diff
during large merges
8612c626d9Cole Miller committed on 6/4/2026, 9:54:03 PM· committed by GitHubparentc40629d
6 files changedLine totals unavailable