public override Selection StartSelectionOrSetEndpoint(TextViewPosition startPosition, TextViewPosition endPosition) { var document = TextArea.Document; if (document == null) { throw ThrowUtil.NoDocumentAssigned(); } return(Create(TextArea, Beg, endPosition)); }
/// <inheritdoc/> public override Selection SetEndpoint(TextViewPosition endPosition) { return(Create(TextArea, Beg, endPosition)); }
/// <summary> /// Returns a new selection with the changed end point. /// </summary> /// <exception cref="NotSupportedException">Cannot set endpoint for empty selection</exception> public abstract Selection SetEndpoint(TextViewPosition endPosition);
/// <summary> /// If this selection is empty, starts a new selection from <paramref name="startPosition"/> to /// <paramref name="endPosition"/>, otherwise, changes the endpoint of this selection. /// </summary> public abstract Selection StartSelectionOrSetEndpoint(TextViewPosition startPosition, TextViewPosition endPosition);
bool IsInVirtualSpace(TextViewPosition pos) { return(pos.VisualColumn > TextArea.TextView.GetOrConstructVisualLine(TextArea.Document.GetLineByNumber(pos.Line)).VisualLength); }