Skip to content

Fix panic in diff hunk rendering - #50163

Merged
ConradIrwin merged 1 commit into
mainfrom
fix-diff-hunk
Feb 26, 2026
Merged

Fix panic in diff hunk rendering#50163
ConradIrwin merged 1 commit into
mainfrom
fix-diff-hunk

Conversation

@ConradIrwin

@ConradIrwin ConradIrwin commented Feb 26, 2026

Copy link
Copy Markdown
Member

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

Updates  #49260
@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 staff Pull requests authored by a current member of Zed staff label Feb 26, 2026
@ConradIrwin

Copy link
Copy Markdown
Member Author

/cherry-pick preview
/cherry-pick stable

@ConradIrwin
ConradIrwin enabled auto-merge (squash) February 26, 2026 05:32
@ConradIrwin
ConradIrwin merged commit 8453286 into main Feb 26, 2026
38 checks passed
@ConradIrwin
ConradIrwin deleted the fix-diff-hunk branch February 26, 2026 05:34
github-actions Bot pushed a commit that referenced this pull request Feb 26, 2026
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
github-actions Bot pushed a commit that referenced this pull request Feb 26, 2026
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
zed-zippy Bot added a commit that referenced this pull request Feb 26, 2026
…50164)

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](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

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
zed-zippy Bot added a commit that referenced this pull request Feb 26, 2026
…0165)

Cherry-pick of #50163 to stable

----
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

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
rtfeldman pushed a commit that referenced this pull request Feb 27, 2026
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
tahayvr pushed a commit to tahayvr/zed that referenced this pull request Mar 4, 2026
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  zed-industries#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
jonx pushed a commit to jonx/zed-aros that referenced this pull request Jul 17, 2026
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  zed-industries#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
jolutz pushed a commit to jolutz/zed that referenced this pull request Aug 8, 2026
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  zed-industries#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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement staff Pull requests authored by a current member of Zed staff

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant