Description
Across the simulator, change/delete commands (including change_selection, bound to both c and, as of #389, Alt-c) never write to sim.registers. The only writers of sim.registers anywhere in the simulator are yank / yank_to_register (src/helix/simulator/commands/clipboard.rs). In upstream Helix, delete and change operations write the deleted text to the active register (default ") so it can subsequently be pasted with p/P, matching standard vi/Helix semantics.
This is the pre-existing bug that the #389 fix's "yank and noyank change_selection are already behaviorally identical" rationale rests on: since neither writes to a register today, reusing the same handler for both change_selection and change_selection_noyank is currently a no-op distinction. Fixing this issue will require splitting that shared registration into two handlers (see the rationale comment added in src/helix/registry/definitions/editing.rs by #389 / PR #394).
Reproduction Steps
- In the trainer, position the cursor on a word or make a selection.
- Press
d (delete) or c (change) to delete/change the selection.
- Move the cursor elsewhere and press
p to paste.
- Observe: nothing is pasted — the deleted text was never written to a register.
Expected Behavior
Delete and change commands should write the deleted text to the default (unnamed) register, so a subsequent p/P pastes it, matching upstream Helix behavior.
Actual Behavior
Registers are only ever populated by explicit yank/yank_to_register commands; delete/change operations silently discard the deleted text.
Environment
Logs / Evidence
Identified via grep for sim.registers writers during adversarial critique and code review of #389 (PR #394). See .local/handoff/2026-08-10T00-59-47-critic.md and .local/handoff/2026-08-10T01-02-26-review.md in that branch's history for details. Note: fixing this issue will require revisiting the shared change_selection/change_selection_noyank registry entry introduced in #389 to split yank vs. noyank behavior once register writes exist.
Description
Across the simulator, change/delete commands (including
change_selection, bound to bothcand, as of #389,Alt-c) never write tosim.registers. The only writers ofsim.registersanywhere in the simulator areyank/yank_to_register(src/helix/simulator/commands/clipboard.rs). In upstream Helix, delete and change operations write the deleted text to the active register (default") so it can subsequently be pasted withp/P, matching standard vi/Helix semantics.This is the pre-existing bug that the #389 fix's "yank and noyank change_selection are already behaviorally identical" rationale rests on: since neither writes to a register today, reusing the same handler for both
change_selectionandchange_selection_noyankis currently a no-op distinction. Fixing this issue will require splitting that shared registration into two handlers (see the rationale comment added insrc/helix/registry/definitions/editing.rsby #389 / PR #394).Reproduction Steps
d(delete) orc(change) to delete/change the selection.pto paste.Expected Behavior
Delete and change commands should write the deleted text to the default (unnamed) register, so a subsequent
p/Ppastes it, matching upstream Helix behavior.Actual Behavior
Registers are only ever populated by explicit
yank/yank_to_registercommands; delete/change operations silently discard the deleted text.Environment
Logs / Evidence
Identified via grep for
sim.registerswriters during adversarial critique and code review of #389 (PR #394). See.local/handoff/2026-08-10T00-59-47-critic.mdand.local/handoff/2026-08-10T01-02-26-review.mdin that branch's history for details. Note: fixing this issue will require revisiting the sharedchange_selection/change_selection_noyankregistry entry introduced in #389 to split yank vs. noyank behavior once register writes exist.