TermBuf::Input::SequenceScanner
Splits a stream of bytes arriving from the terminal into complete escape sequences and everything else.
Anything waiting on a reply to a query it made needs this to tell that
reply from a keystroke that happened to arrive at the same moment, and
Decoder needs the same split for the same reason. Bytes that do not form
a complete sequence yet are held back rather than guessed at.
#feed yields each chunk it can classify; whatever is left over is
#pending and is put in front of the next chunk fed in. #flush gives up
on what is held and yields it as text, which is what a timeout means.
Constants
The bell, which is one of the two things that can end an OSC string.
The escape byte every sequence begins with.
A sequence longer than this is treated as a stray escape followed by
ordinary input. Without a bound, one ESC with nothing after it would
hold every later byte hostage.
Constructors
Instance methods
Feeds bytes in, yielding each complete chunk that can be classified.
Treats whatever is held back as ordinary text, which is what a timeout means: no more of that sequence is coming.