Skip to content

editor: Fix relative line numbering with deleted blocks present#49656

Merged
MrSubidubi merged 2 commits intomainfrom
editor-relative-line-numbers-v42
Feb 19, 2026
Merged

editor: Fix relative line numbering with deleted blocks present#49656
MrSubidubi merged 2 commits intomainfrom
editor-relative-line-numbers-v42

Conversation

@MrSubidubi
Copy link
Member

This tackles another issue where we would incorrectly show two absolute line numbers with relative line numbering enabled when it really should only have been the current active line number.

Sadly, no tests rn for this as we would need a better test infra for that to properly catch/test this bug. But with the refactored logic, I think this is easier to understand at glance, so at least theres that

Release Notes:

  • Fixed an issue with relative line numbers where some rows would be missing their relative line number with deleted hunks showing.

@MrSubidubi MrSubidubi self-assigned this Feb 19, 2026
@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Feb 19, 2026
@zed-community-bot zed-community-bot bot added the staff Pull requests authored by a current member of Zed staff label Feb 19, 2026
@MrSubidubi
Copy link
Member Author

/cherry-pick preview
/cherry-pick stable

@MrSubidubi MrSubidubi merged commit be26e1a into main Feb 19, 2026
27 checks passed
@MrSubidubi MrSubidubi deleted the editor-relative-line-numbers-v42 branch February 19, 2026 21:34
github-actions bot pushed a commit that referenced this pull request Feb 19, 2026
This tackles another issue where we would incorrectly show two absolute
line numbers with relative line numbering enabled when it really should
only have been the current active line number.

Sadly, no tests rn for this as we would need a better test infra for
that to properly catch/test this bug. But with the refactored logic, I
think this is easier to understand at glance, so at least theres that

Release Notes:

- Fixed an issue with relative line numbers where some rows would be
missing their relative line number with deleted hunks showing.
github-actions bot pushed a commit that referenced this pull request Feb 19, 2026
This tackles another issue where we would incorrectly show two absolute
line numbers with relative line numbering enabled when it really should
only have been the current active line number.

Sadly, no tests rn for this as we would need a better test infra for
that to properly catch/test this bug. But with the refactored logic, I
think this is easier to understand at glance, so at least theres that

Release Notes:

- Fixed an issue with relative line numbers where some rows would be
missing their relative line number with deleted hunks showing.
zed-zippy bot added a commit that referenced this pull request Feb 19, 2026
…) (cherry-pick to preview) (#49657)

Cherry-pick of #49656 to preview

----
This tackles another issue where we would incorrectly show two absolute
line numbers with relative line numbering enabled when it really should
only have been the current active line number.

Sadly, no tests rn for this as we would need a better test infra for
that to properly catch/test this bug. But with the refactored logic, I
think this is easier to understand at glance, so at least theres that

Release Notes:

- Fixed an issue with relative line numbers where some rows would be
missing their relative line number with deleted hunks showing.

Co-authored-by: Finn Evers <finn@zed.dev>
zed-zippy bot added a commit that referenced this pull request Feb 19, 2026
…) (cherry-pick to stable) (#49658)

Cherry-pick of #49656 to stable

----
This tackles another issue where we would incorrectly show two absolute
line numbers with relative line numbering enabled when it really should
only have been the current active line number.

Sadly, no tests rn for this as we would need a better test infra for
that to properly catch/test this bug. But with the refactored logic, I
think this is easier to understand at glance, so at least theres that

Release Notes:

- Fixed an issue with relative line numbers where some rows would be
missing their relative line number with deleted hunks showing.

Co-authored-by: Finn Evers <finn@zed.dev>
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