Пример #1
0
        /// <summary>
        /// Removes some portion of the sequence.
        /// </summary>
        /// <param name="offset">Offset of the remove.</param>
        /// <param name="length">Number of characters to remove.</param>
        public void Remove(int offset, int length)
        {
            if (_readOnly)
            {
                return;
            }

            OnDocumentAboutToBeChanged(new DocumentEventArgs(this, offset, length));
            _undoStack.Push(new UndoableDelete(this, offset, GetText(offset, length)));

            _textBufferStrategy.Remove(offset, length);
            _lineTrackingStrategy.Remove(offset, length);

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