feat(core): wrapIndent for soft-wrap continuations - #1346
Open
Hyuuh wants to merge 2 commits into
Open
Conversation
Add optional same-indent for soft-wrapped lines so continuations keep the logical line's leading indent in both layout and paint, with cursor and hit-testing staying consistent. Default remains none.
Hyuuh
requested review from
Hona,
kommander,
msmps and
simonklee
as code owners
August 7, 2026 06:37
Yoga measure and truncate used content-only width_cols, so padded continuations could under-report intrinsic width or skip ellipsis.
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.
Summary
wrapIndent(none|same, defaultnone) so soft-wrap continuations keep the logical line's leading indent (VS CodewrappingIndent: "same").VirtualLine.pad_colsand narrows continuation wrap width; paint offsets content and hit-testing/cursor stay consistent with painted geometry.TextBufferView/EditorView→TextBufferRenderable/EditBufferRenderable(wrapIndentprop). No breaking change when omitted.Note: orthogonal to #1330 (chunk-boundary reflow after edits).
Test plan
bun run test:native -Dtest-filter="wrap indent"(9/9)wrapIndentget/setwrapMode: "word"|"char"+wrapIndent: "same"— continuations paint under indent; click pad → caret at content start; ↓ from col 0 → content start of continuation