]> git.eshelyaron.com Git - emacs.git/commitdiff
2008-01-04 Tassilo Horn <tassilo@member.fsf.org>
authorTassilo Horn <tassilo@member.fsf.org>
Fri, 4 Jan 2008 13:21:42 +0000 (13:21 +0000)
committerTassilo Horn <tassilo@member.fsf.org>
Fri, 4 Jan 2008 13:21:42 +0000 (13:21 +0000)
* 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.

lisp/ChangeLog
lisp/doc-view.el

index fad86b2b5452e94882e82c7697704259ede26ec1..becb813171b48dfa732965f96bde96376010782f 100644 (file)
@@ -1,3 +1,9 @@
+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.
+
 2008-01-04  Juanma Barranquero  <lekktu@gmail.com>
 
        * bs.el (bs--get-mode-name): Fix typo in previous change.
index 2f1d9f5378399ae726f3ab0bae131af541a6d2ba..9c153dc584f11de014493b8f483a261d597b4f1a 100644 (file)
@@ -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