feat: multi-caret editing (Ctrl+Click, per-caret insert/delete, single-step undo)#105
Conversation
…elete, single-step undo) - New Editor.MultiCaret.cs partial with AdditionalCaretOffsets, ToggleCaretAt, ClearAdditionalCarets - Ctrl+Click adds/removes additional carets in Editor.Mouse.cs - Editing commands (insert/delete/backspace/newline) iterate all carets in reverse offset order inside RunUpdate() for undo collapse - Esc collapses to primary caret - Additional carets render via DrawAdditionalCarets in Editor.Drawing.cs - Tests in EditorMultiCaretTests.cs validate add/remove/track/undo Agent-Logs-Url: https://github.com/gui-cs/Editor/sessions/7b03aa72-499b-44ed-bed4-ab2c6f1eff89 Co-authored-by: tig <585482+tig@users.noreply.github.com>
…ttr, clean up tests Agent-Logs-Url: https://github.com/gui-cs/Editor/sessions/7b03aa72-499b-44ed-bed4-ab2c6f1eff89 Co-authored-by: tig <585482+tig@users.noreply.github.com>
|
@copilot See the consitituion and make sure you are following it (you are not). |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7467d18e80
ℹ️ 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".
…ief), R9 (ted wiring) - Move additional-caret rendering from direct draw to MultiCaretRenderer : IBackgroundRenderer (R1) - Use AddRune instead of ch.ToString() for proper cell-based rendering (R2) - Add HasMultipleCarets/ToggleCaretAt/ClearAdditionalCarets to specs/public-api.md (R8) - Wire multi-caret indicator in ted status bar so feature is exercisable (R9) Agent-Logs-Url: https://github.com/gui-cs/Editor/sessions/94cce0e0-db7a-4e71-a5d4-690767b08be7 Co-authored-by: tig <585482+tig@users.noreply.github.com>
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
Fixed in a4f97bd. The violations were:
|
|
@copilot see CR feedback. Ensure there's a test that proves the CR feedback (or not) and then fix. |
…art indent delete CR feedback addressed: - MultiCaretNewLine now applies IndentationStrategy.IndentLine after inserting newline at each caret, matching single-caret InsertNewLineWithAutoIndent behavior. - MultiCaretDeleteLeft now calls TryDeleteIndentationLeftAt to delete a full indentation unit when the caret is at a leading-whitespace boundary, matching single-caret smart-backspace behavior. - Extracted TryDeleteIndentationLeftAt(offset) from TryDeleteIndentationLeft() to support arbitrary offset (used by both single- and multi-caret paths). - Added two tests proving both behaviors. Agent-Logs-Url: https://github.com/gui-cs/Editor/sessions/76ee9161-1be5-473a-a215-8dcda238a093 Co-authored-by: tig <585482+tig@users.noreply.github.com>
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
…ft code paths Agent-Logs-Url: https://github.com/gui-cs/Editor/sessions/76ee9161-1be5-473a-a215-8dcda238a093 Co-authored-by: tig <585482+tig@users.noreply.github.com>
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
Fixed in 62a99f1 and 7d003d9. Both CR issues addressed:
Extracted Two new tests exercise the actual |
|
@copilot resolve the merge conflicts in this pull request |
…caret-support # Conflicts: # src/Terminal.Gui.Editor/Editor.Commands.cs Co-authored-by: tig <585482+tig@users.noreply.github.com>
Resolved in 1fb077a. The conflict was in |
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
Agent-Logs-Url: https://github.com/gui-cs/Editor/sessions/e13e1f4a-3254-4212-9b9b-eac0c500b080 Co-authored-by: tig <585482+tig@users.noreply.github.com>
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
Fixed in 49b0bf7 (with cleanup in e92d447). Both CR feedback items addressed:
|
|
@copilot ensure this is documented in the readme. Add a ./examples/ted/docs/multi-caret.md as well (I will be creating a ted feature with a help browser) in a future pr. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0d460ec692
ℹ️ 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".
…caret.md Agent-Logs-Url: https://github.com/gui-cs/Editor/sessions/74aac025-ea56-4437-90d9-1e1dd6448561 Co-authored-by: tig <585482+tig@users.noreply.github.com>
Done in 39ee69f. Added a multi-caret bullet to the README Features → Editing section (with a link), and created |
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
|
@copilot see new CR comments. Ensure there are unit tests that fail proving the issue before fixing. |
…exclusive segEnd bound Agent-Logs-Url: https://github.com/gui-cs/Editor/sessions/40e6a456-611c-47a9-ac5d-d849322164fa Co-authored-by: tig <585482+tig@users.noreply.github.com>
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
Fixed in 757f1b4. Both CR items addressed:
Two integration tests prove both fixes: |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 20ceab0f67
ℹ️ 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 new CR feedback. ensure there are unit tests that fail proving the issue before fixing it. |
…ment for testability) Agent-Logs-Url: https://github.com/gui-cs/Editor/sessions/e8cb4762-cc0f-4801-8f4f-5c8f8f43968c Co-authored-by: tig <585482+tig@users.noreply.github.com>
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
Fixed in 90323b8. The CR issue was that Extracted 7 unit tests ( |
…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>
examples/ted/docs/multi-caret.mdfor future help browser>=instead of>) prevents duplicate carets at word-wrap boundariesIsOffsetInSegmentallowsoffset == segEndonly at true line end (not wrap boundaries)