Skip to content

editor: Fix JoinLines with selection to end-of-line#48035

Merged
SomeoneToIgnore merged 2 commits intozed-industries:mainfrom
jrobsonchase:fix-join-line-selections
Feb 26, 2026
Merged

editor: Fix JoinLines with selection to end-of-line#48035
SomeoneToIgnore merged 2 commits intozed-industries:mainfrom
jrobsonchase:fix-join-line-selections

Conversation

@jrobsonchase
Copy link
Copy Markdown
Contributor

Full line selections should only include the next line if there's a single line selected. Otherwise, if multiple lines are selected, only the selected lines should be joined.

Also updates the editor tests to include both of these cases.

Closes #48030

Release Notes:

  • Fixed editor::JoinLines when a multi-line selection includes the end of the final line

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Jan 30, 2026
A selection to the end of a line should only join the next line if
there's only one line selected.
@jrobsonchase jrobsonchase force-pushed the fix-join-line-selections branch from 57362a8 to 23bbe3f Compare February 18, 2026 15:28
@jrobsonchase jrobsonchase requested a review from a team as a code owner February 18, 2026 15:28
@SomeoneToIgnore SomeoneToIgnore self-assigned this Feb 24, 2026
Copy link
Copy Markdown
Contributor

@SomeoneToIgnore SomeoneToIgnore left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thank you!

@SomeoneToIgnore SomeoneToIgnore merged commit b6a2283 into zed-industries:main Feb 26, 2026
27 checks passed
rtfeldman pushed a commit that referenced this pull request Feb 27, 2026
Full line selections should only include the next line if there's a
single line selected. Otherwise, if multiple lines are selected, only
the selected lines should be joined.

Also updates the editor tests to include both of these cases.

Closes #48030 

Release Notes:

- Fixed `editor::JoinLines` when a multi-line selection includes the end
of the final line
tahayvr pushed a commit to tahayvr/zed that referenced this pull request Mar 4, 2026
…8035)

Full line selections should only include the next line if there's a
single line selected. Otherwise, if multiple lines are selected, only
the selected lines should be joined.

Also updates the editor tests to include both of these cases.

Closes zed-industries#48030 

Release Notes:

- Fixed `editor::JoinLines` when a multi-line selection includes the end
of the final line
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

JoinLines includes the next line if the selection is to the end of a line

2 participants