public static void moveCaretPageUp(@NotNull Editor editor, boolean isWithSelection) {
    int lineHeight = editor.getLineHeight();
    Rectangle visibleArea = getVisibleArea(editor);
    editor.getScrollingModel().scrollVertically(adjustYToVisualLineBase(editor,
                                                                         visibleArea.y - visibleArea.height / lineHeight * lineHeight));
    int lineShift = calcVisualLineIncrement(editor, editor.getCaretModel().getVisualPosition().line, -visibleArea.height);
    editor.getCaretModel().moveCaretRelatively(0, lineShift, isWithSelection, editor.isColumnMode(), true);
  }
public static void moveCaretPageUp(@NotNull Editor editor, boolean isWithSelection)