Groups buffer-related fields from EditorState.
Tracks the active buffer pid, the list of open buffers, the active index, and special (unlisted) buffers like Messages.
Summary
Functions
Appends a buffer pid and makes it active.
Appends a buffer pid without changing the active buffer.
Switches to the buffer at idx, wrapping around.
Switches to the buffer with the given pid, if it exists in the list.
Types
@type t() :: %MingaEditor.State.Buffers{ active: pid() | nil, active_index: non_neg_integer(), help: pid() | nil, list: [pid()], messages: pid() | nil }
Functions
Appends a buffer pid and makes it active.
Appends a buffer pid without changing the active buffer.
@spec switch_to(t(), non_neg_integer()) :: t()
Switches to the buffer at idx, wrapping around.
Switches to the buffer with the given pid, if it exists in the list.