protected override void OnEnter(EventArgs e) { // SD2-1072 - Make sure the caret line is valid if anyone // has handlers for the Enter event. Caret.ValidateCaretPos(); base.OnEnter(e); }
void DocumentTextContentChanged(object sender, EventArgs e) { // after the text content is changed abruptly, we need to validate the // caret position - otherwise the caret position is invalid for a short amount // of time, which can break client code that expects that the caret position is always valid Caret.ValidateCaretPos(); }
void DocumentUpdateCommitted(object sender, EventArgs e) { if (motherTextEditorControl.IsInUpdate == false) { Caret.ValidateCaretPos(); // AdjustScrollBarsOnCommittedUpdate if (!scrollToPosOnNextUpdate.IsEmpty) { ScrollTo(scrollToPosOnNextUpdate.Y, scrollToPosOnNextUpdate.X); } if (adjustScrollBarsOnNextUpdate) { AdjustScrollBarsClearCache(); AdjustScrollBars(); } } }