Skip to content

Fix panic in diff hunk rendering (#50163) (cherry-pick to preview)#50164

Merged
zed-zippy[bot] merged 1 commit intov0.226.xfrom
cherry-pick-v0.226.x-84532866
Feb 26, 2026
Merged

Fix panic in diff hunk rendering (#50163) (cherry-pick to preview)#50164
zed-zippy[bot] merged 1 commit intov0.226.xfrom
cherry-pick-v0.226.x-84532866

Conversation

@zed-zippy
Copy link
Contributor

@zed-zippy zed-zippy bot commented Feb 26, 2026

Cherry-pick of #50163 to preview


When row_infos.is_empty() (if you have very very tiny editors) we
could
end up trying to read the first item out of it.

Fixes ZED-5AT
Fixes ZED-54F
Fixes ZED-56N

Updates #49260

cc @Veykril

Before you mark this PR as ready for review, make sure that you have:

  • Added a solid test coverage and/or screenshots from doing manual
    testing
  • Done a self-review taking into account security and performance
    aspects
  • Aligned any UI changes with the UI
    checklist

Release Notes:

  • Fixed a panic rendering diff hunk headers in 0-height editors

When `row_infos.is_empty()` (if you have very very tiny editors) we
could
end up trying to read the first item out of it.

Fixes ZED-5AT
Fixes ZED-54F
Fixes ZED-56N

Updates  #49260

cc @Veykril

Before you mark this PR as ready for review, make sure that you have:
- [ ] Added a solid test coverage and/or screenshots from doing manual
testing
- [ ] Done a self-review taking into account security and performance
aspects
- [ ] Aligned any UI changes with the [UI
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)

Release Notes:

- Fixed a panic rendering diff hunk headers in 0-height editors
@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Feb 26, 2026
@zed-community-bot zed-community-bot bot added the bot Pull requests authored by a bot label Feb 26, 2026
@zed-zippy zed-zippy bot merged commit 233bc4d into v0.226.x Feb 26, 2026
37 checks passed
@zed-zippy zed-zippy bot deleted the cherry-pick-v0.226.x-84532866 branch February 26, 2026 05:44
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