void buffer_Update(object sender, DocumentUpdateEventArgs e) { switch (e.type) { case UpdateType.RebuildLayout: this._LayoutLines.Clear(); this._LayoutLines.UpdateAsReplace(0, 0, this.Length); break; case UpdateType.Replace: if (e.row == null) { this._LayoutLines.UpdateAsReplace(e.startIndex, e.removeLength, e.insertLength); this.Markers.UpdateMarkers(e.startIndex, e.insertLength, e.removeLength); } else { this._LayoutLines.UpdateLineAsReplace(e.row.Value, e.removeLength, e.insertLength); this.Markers.UpdateMarkers(this.LayoutLines.GetIndexFromLineNumber(e.row.Value), e.insertLength, e.removeLength); } this.Dirty = true; break; case UpdateType.Clear: this._LayoutLines.Clear(); this.Dirty = true; break; } if (this.FireUpdateEvent) { this.Update(this, e); } }
void doc_Update(object sender, DocumentUpdateEventArgs e) { switch (e.type) { case UpdateType.RebuildLayout: case UpdateType.Clear: this._LongestWidth = 0; break; } }
void Document_Update(object sender, DocumentUpdateEventArgs e) { switch (e.type) { case UpdateType.Replace: this.JumpCaret(e.startIndex + e.insertLength, true); break; case UpdateType.Clear: this.JumpCaret(0, 0, false); break; } }
internal void FireUpdate(DocumentUpdateEventArgs e) { this.buffer_Update(this.buffer, e); }