Preserve conversion hotkeys after cursor movement#129
Merged
Conversation
…line-hotkeys # Conflicts: # src/domain/text/last_word.rs
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
Problem
Cursor navigation cleared the input journal, so convert word/sequence hotkeys stopped working after moving the caret backward or forward.
Solution
The journal now tracks caret distance from the end, detaches/restores suffix runs around that caret, and extracts the last run/sequence before the caret while preserving text after it. Left/Right update the tracked caret position, End returns it to the journal end, and unsafe navigation keys still clear the journal.
Scope
Included: input journal cursor tracking, regression tests, and an isolated Windows Sandbox E2E harness.
Not included: version bump, release packaging, or a completed sandbox run on this host because Windows Sandbox is not installed/enabled here.
Validation
cargo +nightly fmt --checkcargo +nightly clippy --all-targets --all-features -- -D warningscargo +nightly build --features debug-tracingcargo +nightly test --lockedcargo +nightly build --release --lockedactionlint -colorzizmor --min-severity medium .git diff --checkscripts/e2e/run-sandbox.ps1andscripts/e2e/sandbox-runner.ps1scripts/e2e/run-sandbox.ps1 -NoWaitwas attempted and correctly reported missing Windows Sandbox on this host.Risks
The true interactive E2E scenario still needs to run on a Windows host with Windows Sandbox enabled. Home/Up/Down/Page navigation still invalidates the journal because the hook cannot reliably infer arbitrary line/document positions without a focused-control integration.