Scroll::Sorter
Reorders the retained tail window for STDERR display only. It is applied
between tail.snapshot and renderer.draw, and never touches STDOUT or the
Tail's input-order invariants.
Design note (plan alignment): under sorting the tool's normal "never slow
STDOUT" priority is intentionally relaxed. STDOUT, when present, is still an
input-order passthrough (byte identity preserved) — it is just no longer the
performance priority while the display is being sorted over the full window.
The headline use case is sort + --file/-f follow with no STDOUT at all.
Constructors
Instance methods
The comparable key for one line, exposed so SortWindow can track the
top-N without re-implementing key extraction. --reverse is not baked in
here — callers apply it to the comparison.
Reorder for display only. Returns the same array (identity) when no ordering is requested, so the common path adds zero overhead.