ICSharpCode.AvalonEdit.Editing.LineNumberMargin.ExtendSelection C# (CSharp) Method

ExtendSelection() private method

private ExtendSelection ( SimpleSegment currentSeg ) : void
currentSeg SimpleSegment
return void
        void ExtendSelection(SimpleSegment currentSeg)
        {
            if (currentSeg.Offset < selectionStart.Offset) {
                textArea.Caret.Offset = currentSeg.Offset;
                textArea.Selection = new SimpleSelection(currentSeg.Offset, selectionStart.Offset + selectionStart.Length);
            } else {
                textArea.Caret.Offset = currentSeg.Offset + currentSeg.Length;
                textArea.Selection = new SimpleSelection(selectionStart.Offset, currentSeg.Offset + currentSeg.Length);
            }
        }