void OnSelectionChanged() { //clear cache cachedTextVersion = -1; cachedText = null; cachedCharIndexToPlace = null; // if (tb.Selection == this) { if (updating == 0) { tb.OnSelectionChanged(); } } }