public virtual Selection StartSelectionOrSetEndpoint(int startOffset, int newEndOffset) { if (IsEmpty) return new SimpleSelection(startOffset, newEndOffset); else return SetEndpoint(newEndOffset); }