IEditorOperations.AddBeforeTextBufferChangePrimitive Method
Adds an ITextUndoPrimitive to the ITextUndoHistory for the buffer that will revert the selection to the current state when it is undone.
Namespace: Microsoft.VisualStudio.Text.Operations
Assembly: Microsoft.VisualStudio.Text.UI (in Microsoft.VisualStudio.Text.UI.dll)
Syntax
声明
Sub AddBeforeTextBufferChangePrimitive
void AddBeforeTextBufferChangePrimitive()
void AddBeforeTextBufferChangePrimitive()
abstract AddBeforeTextBufferChangePrimitive : unit -> unit
function 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.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.