Raxol.Terminal.Scroll.Sync (Raxol v2.0.1)
View SourceHandles scroll synchronization across terminal splits. Tracks recent sync events for analytics and smarter sync strategies.
Summary
Functions
Analyzes recent sync patterns: returns average lines per sync and alternation ratio.
Creates a new sync instance.
Synchronizes scroll operations across splits and records the event.
Types
@type sync_event() :: %{ direction: :up | :down, lines: non_neg_integer(), timestamp: integer() }
@type t() :: %Raxol.Terminal.Scroll.Sync{ history: [sync_event()], last_sync: non_neg_integer(), sync_enabled: boolean() }
Functions
Analyzes recent sync patterns: returns average lines per sync and alternation ratio.
@spec new() :: t()
Creates a new sync instance.
@spec sync(t(), :up | :down, non_neg_integer()) :: t()
Synchronizes scroll operations across splits and records the event.