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

Fix poll(Duration::ZERO) with use-dev-tty #840

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Hirevo
Copy link

@Hirevo Hirevo commented Nov 3, 2023

This PR fixes the incorrect behaviour of crossterm::event::poll(Duration::ZERO) when use-dev-tty is used.

Previously, events that were already buffered were only checked if some amount of time was left before the timeout, which is never the case when Duration::ZERO is used, which did lead to events being buffered but unreported.

Now, we always check buffered events at least once, regardless of timeout.

Fixes #839.

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.

crossterm::event::poll(Duration::ZERO) incorrectly returns false with use-dev-tty enabled
1 participant