Function: pdf-view--previous-line-or-previous-page

pdf-view--previous-line-or-previous-page is an interactive and natively compiled function defined in pdf-view.el.

Signature

(pdf-view--previous-line-or-previous-page &optional ARG)

Documentation

Scroll downward by ARG lines if possible, else go to the previous page.

When pdf-view-continuous is non-nil, scrolling a line downward at the top edge of the page moves to the previous page.

Key Bindings

This command is not in any keymaps.

Source Code

;; Defined in /nix/store/63h5z2vmzn0mfavcxi2idi23g5xcgkbl-emacs-packages-deps/share/emacs/site-lisp/elpa/pdf-tools-20260102.1101/pdf-view.el
(defun pdf-view--previous-line-or-previous-page (&optional arg)
  "Scroll downward by ARG lines if possible, else go to the previous page.

When `pdf-view-continuous' is non-nil, scrolling a line downward
at the top edge of the page moves to the previous page."
  (interactive "p")
  (if pdf-view-continuous
      (let ((hscroll (window-hscroll))
            (cur-page (pdf-view-current-page)))
        (when (= (window-vscroll nil pdf-view-have-image-mode-pixel-vscroll)
                 (image-previous-line arg))
          (ignore-errors (pdf-view-previous-page))
          (when (/= cur-page (pdf-view-current-page))
            (image-eob)
            (image-bol 1))
          (image-set-window-hscroll hscroll)))
    (image-previous-line arg)))