while (true)
while (currLineStart != end)
    public int viewToModel(float x, float y, Shape a, Bias[] b)    {      Segment s = getLineBuffer();      Rectangle rect = a.getBounds();      int currLineStart = getStartOffset();            // WrappedLine does not represent the last possible offset in a line.      // So we should never return that offset. Behavior observed in the RI.      int end = getEndOffset() - 1;            int lineHeight = metrics.getHeight();      if (y < rect.y)        return currLineStart;      if (y > rect.y + rect.height)        return end;            // Note: rect.x and rect.width do not represent the width of painted      // text but the area where text *may* be painted. This means the width      // is most of the time identical to the component's width.      while (true)        {          int currLineEnd = calculateBreakPosition(currLineStart, end);          // If we're at the right y-position that means we're on the right          // logical line and we should look for the character          if (y >= rect.y && y < rect.y + lineHeight)            {              try                {                  getDocument().getText(currLineStart, currLineEnd - currLineStart, s);                }              catch (BadLocationException ble)                {                  // Shouldn't happen                }                            return Utilities.getTabbedTextOffset(s, metrics, rect.x,                                                       (int) x,                                                       WrappedPlainView.this,                                                       currLineStart);            }          // Increment rect.y so we're checking the next logical line          rect.y += lineHeight;                    // Increment currLineStart to the model position of the start          // of the next logical line            currLineStart = currLineEnd;        }    }    