FSM state for Operator-Pending mode.
Carries the pending operator (delete/change/yank), the count prefix accumulated before the operator key, and text-object/g-prefix tracking.
Summary
Functions
Creates a new operator-pending state.
Converts operator-pending state back to the base Mode.State,
discarding all operator-specific fields.
Total repeat count: op_count (from before the operator key) × motion count.
Types
@type operator() ::
:comment | :delete | :change | :yank | :indent | :dedent | :reindent
The pending operator.
@type t() :: %Minga.Mode.OperatorPendingState{ count: non_neg_integer() | nil, leader_keys: [String.t()], leader_node: Minga.Keymap.Bindings.node_t() | nil, op_count: pos_integer(), operator: operator(), pending_g: boolean(), text_object_modifier: text_object_modifier() | nil }
@type text_object_modifier() :: :inner | :around
Text object modifier (inner vs around).
Functions
@spec new(operator(), pos_integer()) :: t()
Creates a new operator-pending state.
@spec to_base_state(t()) :: Minga.Mode.State.t()
Converts operator-pending state back to the base Mode.State,
discarding all operator-specific fields.
@spec total_count(t()) :: pos_integer()
Total repeat count: op_count (from before the operator key) × motion count.
For example, 3dw has op_count=3 and count=nil (motion count defaults to 1),
so total_count/1 returns 3. d2w has op_count=1 and count=2, returning 2.