private TextRange processRange(@NotNull TextRange originalRange) {
    TextRange validRange = ensureRangeIsValid(originalRange);
    if (!validRange.isEmpty()) {
      return expandToLines(validRange);
    }
    return validRange;
  }
private TextRange processRange(@NotNull TextRange originalRange)