int (int startOffset, int endOffset) { int startVisualLine = offsetToVisualLine(startOffset, false); int endVisualLine = offsetToVisualLine(endOffset, true); return getMaxTextWidthInLineRange(startVisualLine, endVisualLine) + getInsets().left; }