AvalonEdit
PushOptional Method (operation)
NamespacesICSharpCode.AvalonEdit.DocumentUndoStackPushOptional(IUndoableOperation)
Call this method to push an UndoableOperation on the undostack. However, the operation will be only stored if the undo group contains a non-optional operation. Use this method to store the caret position/selection on the undo stack to prevent having only actions that affect only the caret and not the document.
Declaration Syntax
C#Visual BasicVisual C++
public void PushOptional(
	IUndoableOperation operation
)
Public Sub PushOptional ( _
	operation As IUndoableOperation _
)
public:
void PushOptional(
	IUndoableOperation^ operation
)
Parameters
operation (IUndoableOperation)

Assembly: ICSharpCode.AvalonEdit (Module: ICSharpCode.AvalonEdit.dll) Version: 5.0.0.4238