Editor-mailbox correlation for buffer process lifecycle events.
The Editor process creates monitors; this value only records their identity and the shell context associated with the next buffer registration.
Summary
Functions
Consumes the pending add context and restores the default open behavior.
Records how the shell should integrate the next added buffer.
Returns whether a monitor is already recorded for a buffer.
Records the first monitor reference created for a buffer.
Forgets the monitor correlated with a terminal buffer exit.
Types
@type t() :: %MingaEditor.State.BufferLifecycle{ buffer_add_context: MingaEditor.Shell.buffer_add_context(), buffer_monitors: %{required(pid()) => reference()} }
Functions
@spec consume_buffer_context(t()) :: {MingaEditor.Shell.buffer_add_context(), t()}
Consumes the pending add context and restores the default open behavior.
@spec expect_buffer(t(), MingaEditor.Shell.buffer_add_context()) :: t()
Records how the shell should integrate the next added buffer.
Returns whether a monitor is already recorded for a buffer.
Records the first monitor reference created for a buffer.
Forgets the monitor correlated with a terminal buffer exit.