Skip to content

fix(helix-core): register change_selection_noyank for Alt-c - #394

Merged
bug-ops merged 1 commit into
mainfrom
fix/389-alt-c-noyank-command
Aug 9, 2026
Merged

fix(helix-core): register change_selection_noyank for Alt-c#394
bug-ops merged 1 commit into
mainfrom
fix/389-alt-c-noyank-command

Conversation

@bug-ops

@bug-ops bug-ops commented Aug 9, 2026

Copy link
Copy Markdown
Owner

Summary

Fixes #389

Test plan

  • cargo +nightly fmt --check
  • cargo clippy --all-targets --all-features --workspace -- -D warnings
  • cargo nextest run --workspace --all-features --lib --bins (2217/2217 passed)
  • RUSTDOCFLAGS="--deny rustdoc::broken_intra_doc_links" cargo doc --no-deps (gate passes; one pre-existing unrelated warning in scenario_completion.rs)
  • New test executes CMD_CHANGE_SELECTION_NOYANK through the registry dispatch path (AnyModeSimulator::execute_command), proving the actual regression is fixed

Alt-c was reachable as a canonical key string from real Option+c
keypresses on kitty-protocol terminals but had no CommandMetadata
entry, so execute() hit the unknown-command error path. Register
change_selection_noyank (CMD_CHANGE_SELECTION_NOYANK) reusing
HelixSimulator::change_selection as its handler, since this
simulator never writes registers on change/delete today, making
yank and noyank behaviorally identical. Add the command to
is_insert_command so it drives the Normal-to-Insert transition.
@github-actions github-actions Bot added bug Something isn't working documentation Improvements or additions to documentation helix-core Helix core integration testing Tests and test infrastructure labels Aug 9, 2026
@bug-ops
bug-ops merged commit fb2e0c5 into main Aug 9, 2026
20 checks passed
@bug-ops
bug-ops deleted the fix/389-alt-c-noyank-command branch August 9, 2026 23:10
bug-ops added a commit that referenced this pull request Aug 9, 2026
… register (#399)

Split the change_selection/change_selection_noyank shared handler
(introduced by #389/#394) into two: change_selection now deletes the
full active selection via a shared delete_active_selection helper and
maps the resulting selection through the transaction instead of a
stale pre-transaction cursor offset, fixing multi-range cursor
placement. Change/delete commands (c, d) now write the deleted text
to the default register via yank_to_register, which folds over all
selection ranges instead of only the primary one. change_selection_noyank
(Alt-c) keeps the deletion behavior but does not populate the register.

Fixes #395
Fixes #396
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working documentation Improvements or additions to documentation helix-core Helix core integration testing Tests and test infrastructure

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Alt-c (CMD_CHANGE_SELECTION_NOYANK) has no executable command behind it

1 participant