bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Emacs does not scroll on Mac OS X


From: Andrew Choi
Subject: Re: Emacs does not scroll on Mac OS X
Date: Mon, 01 Sep 2003 09:45:26 -0600
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

Michael Tüxen <Michael.Tuexen@micmac.franken.de> writes:

> I'm using Emacs on Mac OS X (built from the CVS).  After loading a
> long file I can scroll through the file by clicking on the slider and
> moving it. But clicking on the little arrows on the right lower edge
> and holding the mouse down does not scroll through the doc. It
> displays only vertical-scroll-bar down-mouse-1 and when I stop holding
> it down mouse-1 is appended.
> 
> Is this expected behaviour or a bug?

It is a bug now.  It was an attempt to auto-repeat mouse events in the
scroll bar, which used to work.  Perhaps it's better to do without the
auto-repeat:

(defun mac-handle-scroll-bar-event (event)
  "Handle scroll bar EVENT on Mac OS."
  (interactive "e")
  (let* ((position (event-start event))
         (window (nth 0 position))
         (bar-part (nth 4 position)))
    (select-window window)
    (cond
     ((eq bar-part 'up)
      (read-event)                      ; discard mouse-1
      (scroll-down 1))
     ((eq bar-part 'above-handle)
      (read-event)
      (scroll-down))
     ((eq bar-part 'handle)
      (read-event)
      (scroll-bar-drag event))
     ((eq bar-part 'below-handle)
      (read-event)
      (scroll-up))
     ((eq bar-part 'down)
      (read-event)
      (scroll-up 1)))))





reply via email to

[Prev in Thread] Current Thread [Next in Thread]