v0.3.0
The features the first real user's coverage study asked for, in the
order it ranked them, plus the terminal-query work that lets
capability-probing applications run against termlens unmodified.
Changed
ScrollgainedLeftandRightvariants and is now
#[non_exhaustive]. Exhaustivematchon it needs a wildcard arm;
marking it non-exhaustive means later additions won't break code
again.
Added
- Writes now respect the terminal's deadline.
send,send_str,
paste,clickandscrollused to block indefinitely if the
application stopped reading its input and the PTY buffer filled — the
one place the crate's own "no unbounded waits" rule wasn't applied.
They now fail at the deadline with the screen attached and a message
naming the real cause, instead of hanging a CI job. - A fuller mouse API:
click_with(button, col, row)for middle and
right buttons,drag(button, from, to), modifier chords
(MouseButton::Left.ctrl(), mirroringKey::Right.ctrl()), and
horizontal wheel viaScroll::Left/Scroll::Right. Everything
stays mode-aware: encoded for the tracking mode and encoding the
application enabled, and refused with a typed error when the mode
cannot express the gesture — a drag under X10, which reports no
release, is an error rather than a misleading half-gesture. - termlens answers
DECRQM("is private mode n set?"), so an
application that probes before using synchronized output enables it
against termlens —wait_frameworks against programs nobody
modified for the harness. Replies are truthful or absent: modes whose
state the emulator holds exactly report set/reset, everything else
reports "not recognized" rather than a guess.DECRQSS,OSC 4
palette reads andOSC 52clipboard reads are now recognized too, so
an application blocked on one is named in the timeout instead of
hanging silently. TerminalBuilder::foreground_rgbconfigures theOSC 10answer,
which was hardcoded white. Applications that pick a theme by
comparing foreground and background luminance can now be tested
against both.- Every wait now takes a per-call deadline:
wait_frame_for,
wait_idle_forandwait_exit_forjoinwait_until_for. One
known-slow step no longer forces the builder timeout up for every
other wait in the suite — which is what made a genuinely stuck
application burn the long timeout on its first failure. Timeout errors
report the deadline that actually applied. wait_frameretains the last 8 completed frames and evaluates
them oldest first, so a burst of frames arriving in a single read is
observable step by step — a progress counter ticking1,2,3in
one write used to be visible only at3. The retention bound and its
two consequences (a longer burst drops its oldest frames; a retained
frame stays matchable, so a predicate satisfied earlier resolves at
once) are documented onwait_frameand indocs/DESIGN.md§2.