pub struct ScrollOp {
pub top: usize,
pub bottom: usize,
pub count: isize,
}Expand description
A first-class scroll: rows [top..=bottom] shifted by count lines
(positive = up, negative = down). The renderer moves the rows instead of
redrawing them. Recorded by the engine — which executes the scroll — rather
than diff-detected (ADR-0003).
A reported count never exceeds bottom - top + 1 — see
crate::Engine::scroll_delta, which caps it. count is isize here and
i16 on the wire, so an uncapped accumulation overflowed the field and
reversed the shift’s direction; the bound is also the point past which
the value stops meaning anything, since every source row is then outside the
region. The cap is applied when the op is read, not while it accumulates, so
a region that scrolls far and returns still reports its true small net.
No #[non_exhaustive] (#844). 7 out-of-crate literal sites. {top, bottom, count} is the
whole of a region shift, so nothing outside this crate can add to it.
Fields§
§top: usize§bottom: usize§count: isize