Skip to content

Fix split diff stale scroll anchor crash (#58688) (cherry-pick to preview)#58694

Merged
zed-zippy[bot] merged 1 commit into
v1.6.xfrom
cherry-pick-v1.6.x-f1268a12
Jun 5, 2026
Merged

Fix split diff stale scroll anchor crash (#58688) (cherry-pick to preview)#58694
zed-zippy[bot] merged 1 commit into
v1.6.xfrom
cherry-pick-v1.6.x-f1268a12

Conversation

@zed-zippy

@zed-zippy zed-zippy Bot commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

Cherry-pick of #58688 to preview


This crash occurred when the left hand side (LHS) editor in the split
diff retained a stale shared scroll handler after the split editor
unsplits. I added an invariant check to our randomized companion display
map tests to prevent regressions here and explicitly make LHS editor set
a native scroll anchor when unsplitting.

Self-Review Checklist:

  • I've reviewed my own diff for quality, security, and reliability
  • Unsafe blocks (if any) have justifying comments
  • The content is consistent with the UI/UX
    checklist
  • Tests cover the new/changed behavior
  • Performance impact has been considered and is acceptable

Release Notes:

  • Fix crash that could occur when unsplitting a side by side diff view

This crash occurred when the left hand side (LHS) editor in the split
diff retained a stale shared scroll handler after the split editor
unsplits. I added an invariant check to our randomized companion display
map tests to prevent regressions here and explicitly make LHS editor set
a native scroll anchor when unsplitting.

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:

- Fix crash that could occur when unsplitting a side by side diff view
@cla-bot cla-bot Bot added the cla-signed The user has signed the Contributor License Agreement label Jun 5, 2026
@zed-community-bot zed-community-bot Bot added the bot Pull requests authored by a bot label Jun 5, 2026
@zed-zippy zed-zippy Bot merged commit c7ae79a into v1.6.x Jun 5, 2026
41 checks passed
@zed-zippy zed-zippy Bot deleted the cherry-pick-v1.6.x-f1268a12 branch June 5, 2026 19:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bot Pull requests authored by a bot cla-signed The user has signed the Contributor License Agreement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant