public int getVisualLineEndOffset() {
    checkEnd();
    setNextLocation();
    return myNextLocation.atEnd() ? myDocument.getTextLength() :
           myNextLocation.softWrap == myLocation.softWrap ? myDocument.getLineEndOffset(myNextLocation.logicalLine - 2) :
           myNextLocation.offset;
  }
public int getVisualLineEndOffset()