(if (or doc-view-continuous (null arg))
(let ((hscroll (window-hscroll))
(cur-page (doc-view-current-page)))
- (when (= (window-vscroll) (image-scroll-up arg))
+ (when (= (window-vscroll nil t) (image-scroll-up arg))
(doc-view-next-page)
(when (/= cur-page (doc-view-current-page))
(image-bob)
(if (or doc-view-continuous (null arg))
(let ((hscroll (window-hscroll))
(cur-page (doc-view-current-page)))
- (when (= (window-vscroll) (image-scroll-down arg))
+ (when (= (window-vscroll nil t) (image-scroll-down arg))
(doc-view-previous-page)
(when (/= cur-page (doc-view-current-page))
(image-eob)
(if doc-view-continuous
(let ((hscroll (window-hscroll))
(cur-page (doc-view-current-page)))
- (when (= (window-vscroll) (image-next-line arg))
+ (when (= (window-vscroll nil t) (image-next-line arg))
(doc-view-next-page)
(when (/= cur-page (doc-view-current-page))
(image-bob)
(if doc-view-continuous
(let ((hscroll (window-hscroll))
(cur-page (doc-view-current-page)))
- (when (= (window-vscroll) (image-previous-line arg))
+ (when (= (window-vscroll nil t) (image-previous-line arg))
(doc-view-previous-page)
(when (/= cur-page (doc-view-current-page))
(image-eob)
(vscroll (image-mode-window-get 'vscroll win)))
;; Reset scroll settings, in case they were changed.
(if hscroll (set-window-hscroll win hscroll))
- (if vscroll (set-window-vscroll win vscroll)))))))))
+ (if vscroll (set-window-vscroll win vscroll t)))))))))
(defun doc-view-sort (a b)
"Return non-nil if A should be sorted before B.