Beispiel #1
0
 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);
 }
Beispiel #2
0
 public override void InvokeRedo(ITextFlowEditSession editSess)
 {
     editSess.CurrentLineNumber = _startLineNumber;
     editSess.TryMoveCaretTo(_startCharIndex);
     if (_singleInsertTextRun != null)
     {
         editSess.AddTextRunToCurrentLine(_singleInsertTextRun);
     }
     else
     {
         editSess.AddTextRunsToCurrentLine(_insertingTextRuns);
     }
 }