crossterm icon indicating copy to clipboard operation
crossterm copied to clipboard

Document buffering behavior for events

Open thurn opened this issue 10 months ago • 0 comments

The documentation for event::read doesn't discuss buffering behavior: https://docs.rs/crossterm/0.27.0/crossterm/event/fn.read.html, i.e. what happens if multiple events have come in since the last time you checked for events.

Based on briefly looking at the source code I think the behavior is to keep the most recent 32 events and silently drop the rest, returning them in order from oldest to newest. But I could also be reading it completely wrong.

thurn avatar Apr 05 '24 17:04 thurn