fix(helix-core): register change_selection_noyank for Alt-c - #394
Merged
Conversation
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.
This was referenced Aug 9, 2026
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #389
Test plan
cargo +nightly fmt --checkcargo clippy --all-targets --all-features --workspace -- -D warningscargo 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)