Conversation
This allows callers to specify how indentation for soft-wrapped lines should function. For now this uses the existing default of same-level indentation.
Also add soft_wrap_indent tests.
arusahni
force-pushed
the
feat/soft-wrap-indent
branch
from
August 3, 2026 11:17
2ecc39d to
5490cd0
Compare
This is a 1:1 refactor of the existing calculation. A subsequent commit will introduce the change that necessitated this refactor.
Because soft-wrapped display rows now can start on a *lower* indent column than the first display row, we cannot rely on the first row's indent, and now need to check to see if there's enough space to display the code action. If not, use the first display row for the buffer for the code action placement calculation.
arusahni
force-pushed
the
feat/soft-wrap-indent
branch
from
August 3, 2026 11:17
5490cd0 to
9ffe45f
Compare
1 task
Contributor
|
Thank you for the PR: seems that all checks fail due to the code not being able to compile: will close it for now as we'd want something a bit more finished and polished on the topic. |
Contributor
Author
|
@SomeoneToIgnore ugh, that's an embarrassing oversight on my part - I missed some tests when changing a function signature. I'm sorry for wasting some of your cycles. I have pushed this out (fixed) as a different PR in #63468 |
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.
Objective
Solution
same):none,extra_one, andextra_two(where they are multiples of the indent column width).none-level wrap indentation (preceded by a refactor of the function used to calculate its display row).WrapSnapshot::soft_wrap_indentwhere querying a 0-indent wrap returnedNoneinstead ofSome(0)Testing
wrap_map.rsfor all indentation levels.Self-Review Checklist:
Showcase
Screenshots below! Changes are grouped by commit to ease review.
Click to view showcase
sameindent (current Zed behavior)noneindentextra_oneindentextra_twoindentthe setting

Release Notes:
soft_wrap_indentsetting ("none","same","extra_one","extra_two") to configure indentation for soft-wrapped continuation lines.