Example #1
0
        public override void Undo()
        {
            IREditorDocument document = REditorDocument.TryFromTextBuffer(TextBuffer);

            if (document != null)
            {
                document.EndMassiveChange();
            }
        }
Example #2
0
        public void Dispose()
        {
            IREditorDocument document = REditorDocument.TryFromTextBuffer(_textBuffer);
            bool             changed  = true;

            if (document != null)
            {
                changed = document.EndMassiveChange();
            }

            if (!changed)
            {
                _transaction.Cancel();
            }
            else
            {
                _transaction.AddUndo(new EndMassiveChangeUndoUnit(_textBuffer));
                _transaction.Complete();
            }

            _transaction.Dispose();
        }