crossterm icon indicating copy to clipboard operation
crossterm copied to clipboard

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

Open Hirevo opened this issue 2 years ago • 0 comments

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.

Hirevo avatar Nov 03 '23 17:11 Hirevo