In This Article

IUndoableTextChange Interface

Provides the base requirements for a single undoable text change unit.

public interface IUndoableTextChange

Remarks

This interface only stores the necessary information to reconstruct an ITextChange for undo/redo purposes.

Properties

CustomData

Custom data that can be persisted with the text change and restored when undo operations occur later on.

object? CustomData { get; }

Property Value

object

Description

The description of the contents of the text change, usually displayed in the user interface.

string Description { get; }

Property Value

string

IsMerged

Indicates whether this text change is the result of a merge of two or more text changes.

bool IsMerged { get; }

Property Value

bool:

true if this text change is the result of a merge of two or more text changes; otherwise, false.

Operations

The read-only list of ITextChangeOperation objects that make up this text change.

IList<ITextChangeOperation> Operations { get; }

Property Value

IList<ITextChangeOperation>

PostSelectionPositionRanges

The collection of sorted non-overlapping TextPositionRange objects that should be selected in the source view after the text change is applied.

ITextPositionRangeCollection? PostSelectionPositionRanges { get; set; }

Property Value

ITextPositionRangeCollection

PreSelectionPositionRanges

The collection of sorted non-overlapping TextPositionRange objects that were selected in the source view before the text change is applied.

ITextPositionRangeCollection? PreSelectionPositionRanges { get; set; }

Property Value

ITextPositionRangeCollection

RetainSelection

Indicates whether to prevent the caret from moving to the end of the text change in the active view.

bool RetainSelection { get; }

Property Value

bool:

true if the caret move should be prevented; otherwise, false.

Type

An ITextChangeType indicating the type of change that was made.

ITextChangeType Type { get; }

Property Value

ITextChangeType

Extension Methods