private static void expandRegionAtCaret(@Nullable final Editor editor) {
    if (editor == null) return;

    final int[] offsets = editor.getCaretModel().getAllCarets().stream()
      .mapToInt(Caret::getOffset)
      .toArray();
    expandRegionAtOffsets(editor, offsets);
  }
private static void expandRegionAtCaret(@Nullable final Editor editor)