Renderer-owned durable state for one editor window/buffer pairing.
The value is keyed by stable window id and is replaced when that window points
at another buffer. It owns the complete render cache, durable line identity,
resident build/store, row-slot allocator, and the authoritative pending
buffer-delta queue held by WindowCache.
Summary
Functions
Applies newly consumed deltas exactly once and retains them until a frame commits.
Copies the renderer-owned cache from a successful pipeline window.
Starts state for a newly observed window/buffer pair.
Requests one explicit full hydration in a fresh content epoch.
Types
@type hydration_reason() ::
:initial
| :reset_required
| :buffer_replacement
| :renderer_restart
| :identity_reset
| nil
@type t() :: %MingaEditor.Renderer.ResidentWindowState{ buffer: pid(), change_sequence: non_neg_integer() | nil, hydration: hydration_reason(), last_version: non_neg_integer() | nil, line_count: pos_integer() | nil, render_cache: MingaEditor.Renderer.WindowCache.t(), window_id: MingaEditor.Window.id() }
Functions
@spec apply_deltas( t(), [Minga.Buffer.EditDelta.t()], Minga.Buffer.RenderSnapshot.t() | nil, non_neg_integer(), pos_integer(), non_neg_integer() ) :: t()
Applies newly consumed deltas exactly once and retains them until a frame commits.
@spec commit_window( t(), MingaEditor.Renderer.RenderWindow.t(), non_neg_integer() | nil ) :: t()
Copies the renderer-owned cache from a successful pipeline window.
@spec new(MingaEditor.Window.id(), pid(), hydration_reason()) :: t()
Starts state for a newly observed window/buffer pair.
@spec require_hydration( t(), hydration_reason(), non_neg_integer(), pos_integer() | nil, non_neg_integer() | nil ) :: t()
Requests one explicit full hydration in a fresh content epoch.