private int getSelectionEnd() {
    if (myCurrentSelectionIndex >= myCaretData.selectionsSize()) {
      return myEnd;
    }
    return getNearestValueAhead(
      myStartOffset,
      myCaretData.selectionStart(myCurrentSelectionIndex, myReverseIteration),
      myCaretData.selectionEnd(myCurrentSelectionIndex, myReverseIteration)
    );
  }
private int getSelectionEnd()