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 (#661); 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.
Fields§
§top: usize§bottom: usize§count: isizeTrait Implementations§
impl Copy for ScrollOp
impl Eq for ScrollOp
impl StructuralPartialEq for ScrollOp
Auto Trait Implementations§
impl Freeze for ScrollOp
impl RefUnwindSafe for ScrollOp
impl Send for ScrollOp
impl Sync for ScrollOp
impl Unpin for ScrollOp
impl UnsafeUnpin for ScrollOp
impl UnwindSafe for ScrollOp
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more