Skip to main content

Interface: State

actions/EditNew/EditNew.types.State

Internal representation of the current state. This action first handles command targets, then edit targets. This state is used to track cursors, thatTargets, etc as we perform the edits and commands.

Note that each field is an array with the same number of items, equal to the number of original targets passed into the action.

Properties

cursorRanges

cursorRanges: (undefined | Range)[]

Where the cursors should be placed. We update these after each step. They are initially undefined, and we update them as we run commands / perform edits, and the finally use them to set the cursor positions at the end.

Defined in

actions/EditNew/EditNew.types.ts:63


targets

targets: Target[]

This field stores the original targets.

Defined in

actions/EditNew/EditNew.types.ts:49


thatRanges

thatRanges: Range[]

We use this field to track the desired thatMark at the end, updating it as necessary.

Defined in

actions/EditNew/EditNew.types.ts:55