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