Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove early return in keyboard enhancement check #751

Conversation

the-mikedavis
Copy link
Contributor

@the-mikedavis the-mikedavis commented Jan 30, 2023

This block in the if sends the query over stdout if the query couldn't be sent over /dev/tty successfully. If we send it over stdout we should still query for the response though: the early return prevents that so the response to the query might end up not being consumed.

This fixes detection for me on Linux. I will test with macOS as well. (Edit: looks good on macOS too)

This block sends the query over stdout if the query couldn't be sent
over `/dev/tty` successfully. If we send it over stdout we should still
query for the response though. The early return prevents that so the
response to the query can end up not being consumed.
@archseer
Copy link
Contributor

archseer commented Feb 1, 2023

Nice catch! Looks like it was broken in #746

Copy link
Member

@TimonPost TimonPost left a comment

Choose a reason for hiding this comment

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

Ah nice one!

@TimonPost TimonPost merged commit 383d9a7 into crossterm-rs:master Feb 1, 2023
@the-mikedavis the-mikedavis deleted the md-keyboard-enhancement-query-fix branch February 1, 2023 19:50
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.

3 participants