Skip to content

Conversation

Flokkq
Copy link
Contributor

@Flokkq Flokkq commented Mar 22, 2025

Fix KeyModifiers Display impl

Issue:
The KeyModifiers Display implementation incorrectly formats modifier keys due to a misplaced flag, causing the output to be concatenated without + separators.

Current output: "ShiftControlOption"
Expected output: "Shift+Control+Option"

Fix:

  • Moved first = false; outside the if condition to ensure separator placement after the first iteration
  • Added a test (needs verification on Windows + Linux)

Flokkq added 2 commits March 22, 2025 17:11
Signed-off-by: Flokkq <webcla21@htl-kaindorf.at>
- only tested on macos!

Signed-off-by: Flokkq <webcla21@htl-kaindorf.at>
@Flokkq Flokkq requested a review from TimonPost as a code owner March 22, 2025 16:28
Flokkq added a commit to Flokkq/ryvex that referenced this pull request Mar 22, 2025
found a bug in crossterm while implementing lol
crossterm-rs/crossterm#979

Signed-off-by: Flokkq <webcla21@htl-kaindorf.at>
Copy link
Collaborator

@joshka joshka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Neat. Thanks :)

@joshka joshka merged commit 2d3f3f5 into crossterm-rs:master Mar 22, 2025
6 checks passed
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