int (int beginLine, int endLine) { if (!myWidthIsValid) { assert !myDocument.isInBulkUpdate(); assert !myEditor.getInlayModel().isInBatchMode(); calculateTextPreferredWidth(0, Integer.MAX_VALUE); } int maxWidth = beginLine == 0 && endLine == 0 ? (int)myView.getPrefixTextWidthInPixels() : 0; for (int i = beginLine; i < endLine && i < myLineWidths.size(); i++) { maxWidth = Math.max(maxWidth, Math.abs(myLineWidths.getInt(i))); } validateMaxLineWithExtension(); return Math.max(maxWidth, myMaxLineWithExtensionWidth); }