return currLineStart + mark;
    public int viewToModel(float x, float y, Shape a, Bias[] b)    {      Segment s = getLineBuffer();      Rectangle rect = a.getBounds();      int currLineStart = getStartOffset();      int end = getEndOffset();      int lineHeight = metrics.getHeight();      if (y < rect.y)        return currLineStart;      if (y > rect.y + rect.height)        return end - 1;      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)            {              // Check if the x position is to the left or right of the text              if (x < rect.x)                return currLineStart;              if (x > rect.x + rect.width)                return currLineEnd - 1;                            try                {                  getDocument().getText(currLineStart, end - currLineStart, s);                }              catch (BadLocationException ble)                {                  // Shouldn't happen                }              int mark = Utilities.getTabbedTextOffset(s, metrics, rect.x,                                                       (int) x,                                                       WrappedPlainView.this,                                                       currLineStart);              return currLineStart + mark;            }          // 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          if (currLineEnd == currLineStart)            currLineStart = end;          else            currLineStart = currLineEnd;        }    }    