]> code.delx.au - gnu-emacs/blobdiff - lisp/scroll-bar.el
(rmail-summary-get-new-mail): Don't call rmail-summary-goto-msg if msg is 0.
[gnu-emacs] / lisp / scroll-bar.el
index ad1e07abcdb72f63af06bc363c6c8970e7554407..ca7d14532ee52e12b48a9939bd87cafb43c13c8e 100644 (file)
@@ -1,6 +1,6 @@
 ;;; scroll-bar.el --- window system-independent scroll bar support.
 
-;;; Copyright (C) 1993, 1994 Free Software Foundation, Inc.
+;;; Copyright (C) 1993, 1994, 1995 Free Software Foundation, Inc.
 
 ;; Maintainer: FSF
 ;; Keywords: hardware
@@ -132,11 +132,13 @@ EVENT should be a scroll bar click or drag event."
   "Scroll the window by dragging the scroll bar slider.
 If you click outside the slider, the window scrolls to bring the slider there."
   (interactive "e")
-  (let* (done)
+  (let* (done
+        (echo-keystrokes 0))
     (or point-before-scroll
        (setq point-before-scroll (point)))
-    (scroll-bar-drag-1 event)
+    ;; Our scrolling can move point; don't let that clear point-before-scroll.
     (let (point-before-scroll)
+      (scroll-bar-drag-1 event)
       (track-mouse
        (while (not done)
          (setq event (read-event))
@@ -146,7 +148,8 @@ If you click outside the slider, the window scrolls to bring the slider there."
                 (scroll-bar-drag-1 event))
                (t
                 ;; Exit when we get the drag event; ignore that event.
-                (setq done t))))))))
+                (setq done t)))))
+      (sit-for 0))))
 
 (defun scroll-bar-scroll-down (event)
   "Scroll the window's top line down to the location of the scroll bar click.