editor: Fix JoinLines with selection to end-of-line#48035
Merged
SomeoneToIgnore merged 2 commits intozed-industries:mainfrom Feb 26, 2026
Merged
editor: Fix JoinLines with selection to end-of-line#48035SomeoneToIgnore merged 2 commits intozed-industries:mainfrom
SomeoneToIgnore merged 2 commits intozed-industries:mainfrom
Conversation
jrobsonchase
commented
Jan 30, 2026
A selection to the end of a line should only join the next line if there's only one line selected.
57362a8 to
23bbe3f
Compare
SomeoneToIgnore
approved these changes
Feb 26, 2026
Contributor
SomeoneToIgnore
left a comment
There was a problem hiding this comment.
Nice, thank you!
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
editor::JoinLineswhen a multi-line selection includes the end of the final line