Skip to content

Conversation

@HactarCE
Copy link
Contributor

@HactarCE HactarCE commented Dec 17, 2025

Closes #42586

This includes a rewrite of calculate_relative_line_numbers(). Now it's linear-time with respect to the number of rows displayed, instead of linear time with respect to the number of rows displayed plus the distance to the base row.

Release Notes:

  • Improved performance when using relative line numbers in large files
  • Fixed relative line numbers not appearing in sticky headers when using "relative_line_numbers" setting
Now it's O(n) where n = number of rows requested, instead of row range
extended to `relative_to`
@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Dec 17, 2025
@HactarCE HactarCE enabled auto-merge (squash) December 17, 2025 21:58
@cla-bot
Copy link

cla-bot bot commented Dec 17, 2025

We require contributors to sign our Contributor License Agreement, and we don't have @Copilot on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'.

@cla-bot cla-bot bot removed the cla-signed The user has signed the Contributor License Agreement label Dec 17, 2025
@HactarCE HactarCE added the cla-signed The user has signed the Contributor License Agreement label Dec 17, 2025
@HactarCE HactarCE disabled auto-merge December 17, 2025 22:07
@HactarCE HactarCE force-pushed the sticky-relative-line-numbers branch from 1096295 to 9b5dc91 Compare December 17, 2025 22:18
@HactarCE HactarCE force-pushed the sticky-relative-line-numbers branch from ac370a0 to 7f7d7f4 Compare December 19, 2025 17:22
@HactarCE HactarCE merged commit 4ef5d2c into main Dec 19, 2025
23 checks passed
@HactarCE HactarCE deleted the sticky-relative-line-numbers branch December 19, 2025 17:32
MrSubidubi added a commit that referenced this pull request Dec 27, 2025
…5741)

Follow-up to #45164 which
caused the active line number to always be `0` instead of the actual
current line number. No release notes since its only on nightly

Release Notes:

- N/A
CherryWorm pushed a commit to CherryWorm/zed that referenced this pull request Dec 30, 2025
…d-industries#45741)

Follow-up to zed-industries#45164 which
caused the active line number to always be `0` instead of the actual
current line number. No release notes since its only on nightly

Release Notes:

- N/A
rtfeldman pushed a commit that referenced this pull request Jan 5, 2026
Closes #42586 

This includes a rewrite of `calculate_relative_line_numbers()`. Now it's
linear-time with respect to the number of rows displayed, instead of
linear time with respect to the number of rows displayed _plus_ the
distance to the base row.

Release Notes:

- Improved performance when using relative line numbers in large files
- Fixed relative line numbers not appearing in sticky headers
rtfeldman pushed a commit that referenced this pull request Jan 5, 2026
…5741)

Follow-up to #45164 which
caused the active line number to always be `0` instead of the actual
current line number. No release notes since its only on nightly

Release Notes:

- N/A
LivioGama pushed a commit to LivioGama/zed that referenced this pull request Jan 20, 2026
Closes zed-industries#42586 

This includes a rewrite of `calculate_relative_line_numbers()`. Now it's
linear-time with respect to the number of rows displayed, instead of
linear time with respect to the number of rows displayed _plus_ the
distance to the base row.

Release Notes:

- Improved performance when using relative line numbers in large files
- Fixed relative line numbers not appearing in sticky headers
LivioGama pushed a commit to LivioGama/zed that referenced this pull request Jan 20, 2026
…d-industries#45741)

Follow-up to zed-industries#45164 which
caused the active line number to always be `0` instead of the actual
current line number. No release notes since its only on nightly

Release Notes:

- N/A
LivioGama pushed a commit to LivioGama/zed that referenced this pull request Jan 20, 2026
Closes zed-industries#42586 

This includes a rewrite of `calculate_relative_line_numbers()`. Now it's
linear-time with respect to the number of rows displayed, instead of
linear time with respect to the number of rows displayed _plus_ the
distance to the base row.

Release Notes:

- Improved performance when using relative line numbers in large files
- Fixed relative line numbers not appearing in sticky headers
LivioGama pushed a commit to LivioGama/zed that referenced this pull request Jan 20, 2026
…d-industries#45741)

Follow-up to zed-industries#45164 which
caused the active line number to always be `0` instead of the actual
current line number. No release notes since its only on nightly

Release Notes:

- N/A
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

2 participants