User buffer column range when adding selection that skips soft wrap#45594
Merged
User buffer column range when adding selection that skips soft wrap#45594
Conversation
When adding selections above/below with `skip_soft_wrap: true`, use buffer column positions instead of pixel positions. This ensures selections are placed at the same column offset in the buffer rather than at the same visual position, which was incorrect for soft-wrapped lines. For example, selecting "how" in a wrapped line: ```` 1. Very long line to show [how] a wrapped line would look 2. Very long line to show how a wrapped line would look ```` Now correctly adds a selection at the same buffer column in the next line: ```` 1. Very long line to show [how] a wrapped line would look 2. Very long line to show [how] a wrapped line would look ````
rtfeldman
pushed a commit
that referenced
this pull request
Jan 5, 2026
…45594) When adding selections above/below with `skip_soft_wrap: true`, use buffer column positions instead of pixel positions. This ensures selections are placed at the same column offset in the buffer rather than at the same visual position, which was incorrect for soft-wrapped lines. For example, selecting "how" in a wrapped line: ```` 1. Very long line to show [how] a wrapped line would look 2. Very long line to show how a wrapped line would look ```` Now correctly adds a selection at the same buffer column in the next line: ```` 1. Very long line to show [how] a wrapped line would look 2. Very long line to show [how] a wrapped line would look ```` Closes #42137 Release Notes: - Improved `editor: add selection above` and `editor: add selection below` to select at the same text column when skipping soft-wrapped lines, instead of the same visual position
LivioGama
pushed a commit
to LivioGama/zed
that referenced
this pull request
Jan 20, 2026
…ed-industries#45594) When adding selections above/below with `skip_soft_wrap: true`, use buffer column positions instead of pixel positions. This ensures selections are placed at the same column offset in the buffer rather than at the same visual position, which was incorrect for soft-wrapped lines. For example, selecting "how" in a wrapped line: ```` 1. Very long line to show [how] a wrapped line would look 2. Very long line to show how a wrapped line would look ```` Now correctly adds a selection at the same buffer column in the next line: ```` 1. Very long line to show [how] a wrapped line would look 2. Very long line to show [how] a wrapped line would look ```` Closes zed-industries#42137 Release Notes: - Improved `editor: add selection above` and `editor: add selection below` to select at the same text column when skipping soft-wrapped lines, instead of the same visual position
LivioGama
pushed a commit
to LivioGama/zed
that referenced
this pull request
Jan 20, 2026
…ed-industries#45594) When adding selections above/below with `skip_soft_wrap: true`, use buffer column positions instead of pixel positions. This ensures selections are placed at the same column offset in the buffer rather than at the same visual position, which was incorrect for soft-wrapped lines. For example, selecting "how" in a wrapped line: ```` 1. Very long line to show [how] a wrapped line would look 2. Very long line to show how a wrapped line would look ```` Now correctly adds a selection at the same buffer column in the next line: ```` 1. Very long line to show [how] a wrapped line would look 2. Very long line to show [how] a wrapped line would look ```` Closes zed-industries#42137 Release Notes: - Improved `editor: add selection above` and `editor: add selection below` to select at the same text column when skipping soft-wrapped lines, instead of the same visual position
LivioGama
pushed a commit
to LivioGama/zed
that referenced
this pull request
Feb 15, 2026
…ed-industries#45594) When adding selections above/below with `skip_soft_wrap: true`, use buffer column positions instead of pixel positions. This ensures selections are placed at the same column offset in the buffer rather than at the same visual position, which was incorrect for soft-wrapped lines. For example, selecting "how" in a wrapped line: ```` 1. Very long line to show [how] a wrapped line would look 2. Very long line to show how a wrapped line would look ```` Now correctly adds a selection at the same buffer column in the next line: ```` 1. Very long line to show [how] a wrapped line would look 2. Very long line to show [how] a wrapped line would look ```` Closes zed-industries#42137 Release Notes: - Improved `editor: add selection above` and `editor: add selection below` to select at the same text column when skipping soft-wrapped lines, instead of the same visual position
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.
When adding selections above/below with
skip_soft_wrap: true, use buffer column positions instead of pixel positions. This ensures selections are placed at the same column offset in the buffer rather than at the same visual position, which was incorrect for soft-wrapped lines.For example, selecting "how" in a wrapped line:
Now correctly adds a selection at the same buffer column in the next line:
Closes #42137
Release Notes:
editor: add selection aboveandeditor: add selection belowto select at the same text column when skipping soft-wrapped lines, instead of the same visual position