@Override
    public boolean process(TextRange range) {
      range = expandToFoldingBoundaries(range);
      if (selectionRange.contains(range) && !range.equals(selectionRange) &&
          (range.contains(cursorOffset) || cursorOffset == range.getEndOffset())) {
        if (maximumRange.get() == null || range.contains(maximumRange.get())) {
          maximumRange.set(range);
        }
      }
      return false;
    }
@Override
    public boolean process(TextRange range)