Replace starting inside an atom no longer crashes (ATC-200) #4

Merged
merge-queue merged 1 commit from replace-atom-start into main 2026-11-25 04:16:13 -08:00
Owner

Work package: https://openproject.home.romaine.life/wp/ATC-200

Replace given a range that starts inside an atom removed the atom whole (as remove does), but then put the cursor at the original start offset in the shortened line. That offset could be past the line's end, and the insert that followed panicked. Found by the random-edit run behind the layout cache (composer #3).

  • Changes: Replace snaps its start to the atom's start before removing, and puts the cursor there.
  • Adds: TestReplaceStartingInsideAnAtomTakesItWhole, which panicked before the fix.
  • Leaves alone: every other editing path; a range that starts outside an atom behaves exactly as before.

🤖 Generated with Claude Code

Work package: https://openproject.home.romaine.life/wp/ATC-200 `Replace` given a range that starts inside an atom removed the atom whole (as `remove` does), but then put the cursor at the original start offset in the shortened line. That offset could be past the line's end, and the `insert` that followed panicked. Found by the random-edit run behind the layout cache (composer #3). - **Changes:** `Replace` snaps its start to the atom's start before removing, and puts the cursor there. - **Adds:** `TestReplaceStartingInsideAnAtomTakesItWhole`, which panicked before the fix. - **Leaves alone:** every other editing path; a range that starts outside an atom behaves exactly as before. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Replace starting inside an atom no longer crashes (ATC-200)
All checks were successful
Suite go / scope (pull_request) Successful in 4s
Suite release / module (pull_request) Has been skipped
Suite release / reserve (pull_request) Has been skipped
Suite release / build (none, ubuntu-latest) (ubuntu-latest, none) (pull_request) Has been skipped
Suite release / check-package (pull_request) Has been skipped
Suite release / home-sync (pull_request) Has been skipped
Suite default / check-fetches (pull_request) Has been skipped
Suite go / check-test-linux (pull_request) Successful in 5s
Suite default / scope (pull_request) Successful in 4s
Suite release / scope (pull_request) Successful in 4s
Suite go / check-services (pull_request) Has been skipped
Suite release / check-build (none, ubuntu-latest) (ubuntu-latest, none) (pull_request) Has been skipped
Suite release / finalize (pull_request) Has been skipped
Suite release / reused-checks (pull_request) Has been skipped
Suite release / publish (pull_request) Has been skipped
Suite release / dispatch (pull_request) Has been skipped
Suite release / deploy-image (pull_request) Has been skipped
Suite default / check-rules (pull_request) Successful in 4s
Suite release / check-package (push) Has been skipped
Suite release / finalize (push) Has been skipped
Suite release / reused-checks (push) Has been skipped
Suite release / home-sync (push) Has been skipped
Suite release / publish (push) Has been skipped
Suite release / dispatch (push) Has been skipped
Suite release / deploy-image (push) Has been skipped
Suite default / reused-checks (pull_request) Successful in 3s
Suite go / check-format (pull_request) Successful in 5s
Suite go / check-test-windows (pull_request) Successful in 29s
Suite go / reused-checks (pull_request) Successful in 3s
merge-queue landed on main
b7750a9616
Replace removed the atom whole but then put the cursor at the offset it was
given, which could be past the end of the shortened line, and insert panicked.
The cursor now goes where the removal actually started.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
merge-queue deleted branch replace-atom-start 2026-11-25 04:16:13 -08:00
Sign in to join this conversation.
No reviewers
No labels
queue
No milestone
No project
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
romaine-life/composer!4
No description provided.