int (int startOffset, int endOffset) { if (myUseNewRendering) return myView.getMaxWidthInRange(startOffset, endOffset); int width = 0; int start = offsetToVisualLine(startOffset); int end = offsetToVisualLine(endOffset); for (int i = start; i <= end; i++) { int lastColumn = EditorUtil.getLastVisualLineColumnNumber(this, i) + 1; int lineWidth = visualPositionToXY(new VisualPosition(i, lastColumn)).x; if (lineWidth > width) { width = lineWidth; } } return width; }