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