Example #1
0
        public void Replace(int offset, int length, string text)
        {
            if (readOnly)
            {
                return;
            }
            OnDocumentAboutToBeChanged(new DocumentEventArgs(this, offset, length, text));
            undoStack.Push(new UndoableReplace(this, offset, GetText(offset, length), text));

            textBufferStrategy.Replace(offset, length, text);
            lineTrackingStrategy.Replace(offset, length, text);

            OnDocumentChanged(new DocumentEventArgs(this, offset, length, text));
        }