public static @NotNull Pair<LogicalPosition, LogicalPosition> calcCaretLineRange(@NotNull Caret caret) {
    VisualPosition caretPosition = caret.getVisualPosition();
    return calcSurroundingRange(caret.getEditor(), caretPosition, caretPosition);
  }
public static @NotNull Pair<LogicalPosition, LogicalPosition> calcCaretLineRange(@NotNull Caret caret)