Repository navigation
Play chime for converted selection - #84
Merged
Merged
Conversation
The chime lived only in the word paths of the force-switch hotkey: `convert_selection` pasted the converted text back in silence, so a press that worked looked like one that did nothing. It now plays `SoundEvent::Correct` on success, gated on `general.sound_on_correct` like every other path, and stays silent when nothing was converted.
Member
|
Merged and released in 0.39.0, thank you. I only tightened the test to require exactly one chime, and checked in a VM that the sound card really plays on a converted selection and stays silent with the setting off. |
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.
What & why
When "Also convert selected text" is on, the force-switch hotkey corrects selected text without a chime, so a keypress that worked feels like one that did nothing.
convert_selectionnow playsSoundEvent::Correctafter a successful conversion, gated ongeneral.sound_on_correctlike regular force-switch.Platforms touched
all — the change is in
poltertype-core's selection path and its tests; no per-OS crate is touched.Checklist
cargo fmt --allandcargo clippy --workspace --all-targets --all-features -- -D warningsare clean (the default-features clippy pass andcargo xtask stylewere run too: clean)cargo test --workspacepasses — 1070 passed, 0 failed## [Unreleased]→### Fixedentry inCHANGELOG.md. README needs nothing: it describes the selection gesture but documents chimes for no path, and nothing indocs/claims otherwise.cfgof any kind topoltertype-app/poltertype-core