Skip to content

Play chime for converted selection - #84

Merged
vstrelnikof merged 1 commit into
Just-Code-NET:mainfrom
d-s-x:beep-for-selection
Nov 4, 2026
Merged

vstrelnikof merged 1 commit into
Just-Code-NET:mainfrom
d-s-x:beep-for-selection

Conversation

@d-s-x

@d-s-x d-s-x commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

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_selection now plays SoundEvent::Correct after a successful conversion, gated on general.sound_on_correct like 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 --all and cargo clippy --workspace --all-targets --all-features -- -D warnings are clean (the default-features clippy pass and cargo xtask style were run too: clean)
  • cargo test --workspace passes — 1070 passed, 0 failed
  • Docs that describe the changed behaviour are updated in the same PR: the ## [Unreleased] → ### Fixed entry in CHANGELOG.md. README needs nothing: it describes the selection gesture but documents chimes for no path, and nothing in docs/ claims otherwise.
  • Platform-specific code stays inside the per-OS crates — the diff adds no cfg of any kind to poltertype-app / poltertype-core
  • When touching OS APIs: the official doc for the API is linked — N/A, no OS API touched

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.
@vstrelnikof
vstrelnikof merged commit 39b41a5 into Just-Code-NET:main Nov 4, 2026
5 checks passed
@vstrelnikof

Copy link
Copy Markdown
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.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants