Add soft word wrap to the editor #1

Merged
exler merged 1 commit from feat/editor-word-wrap into main 2026-11-23 22:57:39 +01:00
Collaborator

Summary

Add optional, non-destructive word wrap to the code editor through Window → Toggle Word Wrap (also in the command palette). It is off by default and remembered per project. Visual-row navigation, hit testing and scrolling follow the wrapped text. Resize retains the viewport anchor. Lines above 20,000 characters remain horizontally scrollable; other lines still wrap.

Verification

  • cargo test --locked: 43 passed, including regressions for wide indentation, reflow round trips and stale horizontal scroll after moving off an oversized line.
  • cargo build --locked, cargo clippy --locked --all-targets (pre-existing warnings only), git diff --check.
  • Native Xvfb/lavapipe smoke with synthetic source, wrap off/on, before the last two targeted fixes. Those two paths were reverified with behavioral tests.

Limits

Home/End still use logical lines. The no-folder window does not retain wrap across restarts. Oversized lines retain the existing unwrapped editor's long-line costs.

## Summary Add optional, non-destructive word wrap to the code editor through Window → Toggle Word Wrap (also in the command palette). It is off by default and remembered per project. Visual-row navigation, hit testing and scrolling follow the wrapped text. Resize retains the viewport anchor. Lines above 20,000 characters remain horizontally scrollable; other lines still wrap. ## Verification - `cargo test --locked`: 43 passed, including regressions for wide indentation, reflow round trips and stale horizontal scroll after moving off an oversized line. - `cargo build --locked`, `cargo clippy --locked --all-targets` (pre-existing warnings only), `git diff --check`. - Native Xvfb/lavapipe smoke with synthetic source, wrap off/on, before the last two targeted fixes. Those two paths were reverified with behavioral tests. ## Limits Home/End still use logical lines. The no-folder window does not retain wrap across restarts. Oversized lines retain the existing unwrapped editor's long-line costs.
[verified] Add soft word wrap to the editor
All checks were successful
Verify and release / verify (pull_request) Successful in 2m10s
Verify and release / build (pull_request) Has been skipped
Verify and release / verify (push) Successful in 2m10s
Verify and release / build (push) Has been skipped
7202692dd3
exler merged commit 7202692dd3 into main 2026-11-23 22:57:39 +01:00
exler deleted branch feat/editor-word-wrap 2026-11-23 22:57:39 +01:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
exler/suns!1
No description provided.