feat: word-wrap — soft wrap in VisualLineBuilder + Editor.WordWrap + ted toggle#106
Conversation
…gle) - New WordWrapStrategy.cs: breaks at whitespace boundaries, hard-breaks CJK/no-whitespace runs, produces WrapSegment list - VisualLineBuilder.BuildWrapped: emits multiple CellVisualLines per document line when wrapping is active - Editor.WordWrap property with full cache invalidation - Wrap-aware caret positioning and vertical movement - DrawWrappedLines in Editor.Drawing.cs - UpdateContentSize accounts for wrapped row count - ted Options menu: Word Wrap checkbox toggle - DEC-005: continuation lines flush at column 0 for v1 - Unit tests for WordWrapStrategy (whitespace break, CJK hard-break, empty text, multiple spaces) Agent-Logs-Url: https://github.com/gui-cs/Editor/sessions/35f21281-34ff-41f4-a19b-fd5b6e5e355f Co-authored-by: tig <585482+tig@users.noreply.github.com>
… clean up unused vars Agent-Logs-Url: https://github.com/gui-cs/Editor/sessions/35f21281-34ff-41f4-a19b-fd5b6e5e355f Co-authored-by: tig <585482+tig@users.noreply.github.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fda01e2f9c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@copilot see CR feedback. Ensure there's a test that proves the CR feedback (or not) and then fix. |
…selection after transformers P1: GetWrapMap() now tracks the wrap column used to build the map and automatically rebuilds when viewport width changes. Also invalidated on fold toggle via OnFoldingChanged. P2: BuildWrappedSegmentVisualLine now applies selection AFTER transformers, matching the non-wrapped path. This prevents syntax highlighters from overwriting selection attributes. Includes integration tests proving both issues: - WrapMap_Rebuilds_On_Viewport_Width_Change - Selection_Survives_Transformers_In_Wrapped_Mode Agent-Logs-Url: https://github.com/gui-cs/Editor/sessions/670dca0d-0122-4843-a2ec-ae6fbed2fc65 Co-authored-by: tig <585482+tig@users.noreply.github.com>
Fixed in P1 (wrap map stale on resize/fold): P2 (selection overwritten by transformers): |
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
…rvey All four beta features (find-and-replace #104, clipboard #107, word-wrap #106, multi-caret #105) plus vertical-multi-caret #133 and syntax-theme Phase 2 #134 have merged since the 2026-05-13 plan snapshot. Bring the spec set back in line with develop: - Per-feature status lines -> Done with PR/issue refs (clipboard, multi-caret, find-and-replace, word-wrap, vertical-multi-caret, syntax-theme). - plan.md rescoped to the beta endgame: new "Done (beta)" table, a "Remaining for beta" that reflects no feature work is left (only external/verification/cut items), evidence-checked DoD boxes, refreshed dependency graph and header. - decisions.md: OPEN-005 annotated as settled by syntax-theme; add OPEN-006 (single-line/input-mode decision). - codex-autonomous-sprint.md: flag stale work pool. - New specs/textview-parity-gap/spec.md: survey of TextView capabilities Editor lacks (autocomplete, overwrite mode, single-line mode, kill-ring, context menu) with dispositions; wired into plan.md follow-ups. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
WordWrapStrategy.cs— walks grapheme clusters, breaks at whitespace or hard-breaks, producesWrapSegmentlistBuildWrappedmethod toVisualLineBuilder— emits multipleCellVisualLines per document line when wrappingEditor.WordWrapproperty with cache invalidationEditor.Drawing.csand caret logic to account for word wrap (visual line count, caret positioning, vertical movement)UpdateContentSizeto reflect wrapped line countWordWrapStrategy(break at whitespace, CJK hard-break)