public override void InvokeUndo(ITextFlowEditSession editSess) { editSess.CancelSelect(); //add text to lines... //TODO: check if we need to preserve format or not? editSess.AddTextRunsToCurrentLine(_deletedTextRuns); }
public override void InvokeRedo(ITextFlowEditSession editSess) { editSess.CurrentLineNumber = _startLineNumber; editSess.TryMoveCaretTo(_startCharIndex); if (_singleInsertTextRun != null) { editSess.AddTextRunToCurrentLine(_singleInsertTextRun); } else { editSess.AddTextRunsToCurrentLine(_insertingTextRuns); } }