protected void OnTextBufferChanged(object sender, TextBufferEventArgs e) { if (this._trimmingWhitespace) { return; } this._verticalScrollBar.Maximum = this._buffer.LineCount - 1; using (TextBufferLocation location = this._buffer.CreateTextBufferLocation(this._location)) { location.GotoLine(e.StartLineNumber); while (location.LineIndex <= e.EndLineNumber) { int viewIndex = this.GetViewIndex(location.Line, location.Line.Length); if (viewIndex > this._viewMaxLineLength) { this._viewMaxLineLength = viewIndex; } if (location.MoveDown(1) == 0) { goto Label_008A; } } } Label_008A: this._horizontalScrollBar.Maximum = this._viewMaxLineLength; this.UpdateScrollBarVisibility(); if ((this.ViewTopLineNumber + this.VisibleLines) > (this._buffer.LineCount - 1)) { this.ViewTopLineNumber = Math.Max(0, this._buffer.LineCount - this.VisibleLines); } if (this._selectionExists) { int num2 = e.EndIndex - e.OldEndIndex; if ((this._selection.Start.LineIndex == e.OldEndLineNumber) && (this._selection.Start.ColumnIndex > e.OldEndIndex)) { TextBufferLocation start = this._selection.Start; start.ColumnIndex += num2; } if ((this._selection.End.LineIndex == e.OldEndLineNumber) && (this._selection.End.ColumnIndex >= e.OldEndIndex)) { TextBufferLocation end = this._selection.End; end.ColumnIndex += num2; } } if (e.OldEndLineNumber == e.EndLineNumber) { this.AddDirtyLines(e.StartLineNumber, Math.Max(e.OldEndLineNumber, e.EndLineNumber) + 1); } else { this.AddDirtyLines(e.StartLineNumber, this.ViewTopLineNumber + this.VisibleLines); } }
protected virtual void OnTextBufferChanged(object sender, TextBufferEventArgs e) { TextBufferEventHandler handler = (TextBufferEventHandler) base.Events[this.EventTextBufferChanged]; if (handler != null) { handler(this, e); } }
protected override void OnTextBufferChanged(object sender, TextBufferEventArgs e) { base.OnTextBufferChanged(sender, e); this._commandManager.UpdateCommands(false); if (!this._internalChange) { this._dirty = true; this.OnDocumentChanged(EventArgs.Empty); } }
protected void OnTextBufferChanged(TextBufferEventArgs e) { this._cachedString = null; if (this.TextBufferChanged != null) { this.TextBufferChanged(this, e); } }