Interface ICommand

Expand description

A command that modifies text / cursor state on a model.

interface ICommand {
    computeCursorState(
        model: ITextModel,
        helper: ICursorStateComputerData,
    ): Selection;
    getEditOperations(
        model: ITextModel,
        builder: IEditOperationBuilder,
    ): void;
}

Methods§

§

computeCursorState(
    model: ITextModel,
    helper: ICursorStateComputerData,
): Selection

Compute the cursor state after the edit operations were applied.

§

getEditOperations(
    model: ITextModel,
    builder: IEditOperationBuilder,
): void

Get the edit operations needed to execute this command.