Shared per-buffer store for inline overlays (ask and edit).
Both variants key their ephemeral overlays by buffer_pid and track an optional session through a leaf-owner query. The lookup/insert/dismiss/session plumbing only touches those facts, so it lives here once and is reused by both MingaEditor.State.InlineAsk and MingaEditor.State.InlineEdit rather than being copied per variant.
Summary
Functions
Returns the active overlay for a buffer, or nil.
Dismisses the overlay for a buffer.
Opens or replaces an overlay for its buffer.
Returns true when the given session pid belongs to an overlay in this store.
Types
An overlay struct carrying :buffer_pid.
A per-buffer overlay store.
Functions
Returns the active overlay for a buffer, or nil.
@spec dismiss(store(), pid() | nil, session_pid_fun()) :: {store(), pid() | nil}
Dismisses the overlay for a buffer.
Returns {store, session_pid} where session_pid is the dismissed overlay's session pid (or nil when there was no overlay), so callers can stop the session.
Opens or replaces an overlay for its buffer.
@spec session?(store(), pid(), session_pid_fun()) :: boolean()
Returns true when the given session pid belongs to an overlay in this store.