@kkdev92/vscode-ext-kit - v4.1.1
    Preparing search index...

    Interface TextEditOptions

    How a batch of edits lands in the undo stack.

    interface TextEditOptions {
        undoStop?: "none" | "both" | "before" | "after";
    }
    Index
    undoStop?: "none" | "both" | "before" | "after"

    Where this batch places undo boundaries.

    'both' makes it its own undo step, which is what a single edit wants. The other three exist so several batches can be joined into one step: the first opens it, the middle ones add to it, and the last closes it. Without that, "apply three transforms in a row" is three undos — and it cannot be one batch, because each stage has to see what the previous one left behind.

    ActiveEditor.editStages is the way to do that without tracking the boundaries by hand.

    'both'