diff options
author | Tassilo Horn <tassilo@member.fsf.org> | 2008-01-04 13:21:16 +0000 |
---|---|---|
committer | Tassilo Horn <tassilo@member.fsf.org> | 2008-01-04 13:21:16 +0000 |
commit | 7ef8efcaea64401d029f47fe9e2f03461df8995d (patch) | |
tree | 2ea5fcb5638cc97871e163c777936dfce79ab723 /lisp/doc-view.el | |
parent | 4770e11e8e5b23a10f47111441f61d561736c7a7 (diff) | |
download | emacs-7ef8efcaea64401d029f47fe9e2f03461df8995d.tar.gz |
2008-01-04 Tassilo Horn <tassilo@member.fsf.org>
* doc-view.el (doc-view-scroll-up-or-next-page)
(doc-view-scroll-down-or-previous-page): Don't scroll to the
top/bottom again when on the first/last page.
Diffstat (limited to 'lisp/doc-view.el')
-rw-r--r-- | lisp/doc-view.el | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/lisp/doc-view.el b/lisp/doc-view.el index 2f1d9f53783..9c153dc584f 100644 --- a/lisp/doc-view.el +++ b/lisp/doc-view.el @@ -380,15 +380,19 @@ has finished." "Scroll page up if possible, else goto next page." (interactive) (when (= (window-vscroll) (image-scroll-up nil)) - (doc-view-next-page) - (set-window-vscroll nil 0))) + (let ((cur-page doc-view-current-page)) + (doc-view-next-page) + (when (/= cur-page doc-view-current-page) + (set-window-vscroll nil 0))))) (defun doc-view-scroll-down-or-previous-page () "Scroll page down if possible, else goto previous page." (interactive) (when (= (window-vscroll) (image-scroll-down nil)) - (doc-view-previous-page) - (image-scroll-up nil))) + (let ((cur-page doc-view-current-page)) + (doc-view-previous-page) + (when (/= cur-page doc-view-current-page) + (image-scroll-up nil))))) ;;;; Utility Functions |