public static void setRelativeCaretPosition(@NotNull Editor editor, int position) {
    ReadAction.run(() -> {
      int caretY = editor.visualLineToY(editor.getCaretModel().getVisualPosition().line);
      editor.getScrollingModel().scrollVertically(caretY - position);
    });
  }
public static void setRelativeCaretPosition(@NotNull Editor editor, int position)