public void Do( ITextBuffer target ) { if( replaceTextCommand == null ) { target.MovePoint( Direction.Left, removed.Length ); replaceTextCommand = new ReplaceText( target, "" ); } replaceTextCommand.Do( target ); }
public void Do(ITextBuffer target) { if (done) throw new InvalidOperationException("already done"); if (replaceCommand == null) { target.Mark = target.Point; target.MovePoint( left ? Direction.Left : Direction.Right ); replaceCommand = new ReplaceText(target, null); } replaceCommand.Do(target); done = true; }
public void Undo(ITextBuffer target) { replaceTextCommand.Undo( target ); target.MovePoint( Direction.Right, removed.Length ); target.Mark = target.Point; }