Пример #1
0
        public void Do( ITextBuffer target )
        {
            if( replaceTextCommand == null )
            {
                target.MovePoint( Direction.Left, removed.Length );
                replaceTextCommand = new ReplaceText( target, "" );
            }

            replaceTextCommand.Do( target );
        }
Пример #2
0
        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;
        }
Пример #3
0
 public void Undo(ITextBuffer target)
 {
     replaceTextCommand.Undo( target );
     target.MovePoint( Direction.Right, removed.Length );
     target.Mark = target.Point;
 }