diff options
author | Tassilo Horn <tassilo@member.fsf.org> | 2008-01-04 13:21:42 +0000 |
---|---|---|
committer | Tassilo Horn <tassilo@member.fsf.org> | 2008-01-04 13:21:42 +0000 |
commit | bcc758eca97781b4849e0ce4bfe8a0589ece0ea3 (patch) | |
tree | 235ee4b5534f95598969031f1ceb78ef9bbce7a6 /lisp/doc-view.el | |
parent | c2699583bebb76b73645cb49c75bfc5132442955 (diff) | |
download | emacs-bcc758eca97781b4849e0ce4bfe8a0589ece0ea3.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 |