Compartilhar via


IEditorOperations.AddBeforeTextBufferChangePrimitive Method

Definition

Adds an ITextUndoPrimitive to the ITextUndoHistory for the buffer that will revert the selection to the current state when it is undone.

public:
 void AddBeforeTextBufferChangePrimitive();
public:
 void AddBeforeTextBufferChangePrimitive();
void AddBeforeTextBufferChangePrimitive();
public void AddBeforeTextBufferChangePrimitive ();
abstract member AddBeforeTextBufferChangePrimitive : unit -> unit
Public Sub AddBeforeTextBufferChangePrimitive ()

Remarks

When performing edits that will change the selection, you can surround the edits with calls to AddBeforeTextBufferChangePrimitive() and AddAfterTextBufferChangePrimitive() to ensure that the selection behaves correctly when the edits are undone and redone.

Applies to