Handles predictive scrolling operations for the terminal. Tracks recent scrolls and provides pattern analysis for smarter prediction.
Summary
Functions
Analyzes recent scroll patterns: returns average scroll size and alternation ratio.
Creates a new predictor instance.
Adds a scroll event to the history and keeps only the window size worth of history.
Types
@type scroll_event() :: %{ direction: :up | :down, lines: non_neg_integer(), timestamp: integer() }
@type t() :: %Raxol.Terminal.Scroll.Predictor{ history: [scroll_event()], window_size: non_neg_integer() }