crossterm-rs / crossterm

Cross platform terminal library rust
MIT License
3.29k stars 280 forks source link

Remove early return in keyboard enhancement check #751

Closed the-mikedavis closed 1 year ago

the-mikedavis commented 1 year ago

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)

archseer commented 1 year ago

Nice catch! Looks like it was broken in https://github.com/crossterm-rs/crossterm/pull/746