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

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

bug#57349: 29.0.50; pixel-scroll-precision-mode. error integer-or-marker


From: Gerd Möllmann
Subject: bug#57349: 29.0.50; pixel-scroll-precision-mode. error integer-or-marker-p nil
Date: Tue, 23 Aug 2022 14:36:52 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (darwin)

Gerd Möllmann <gerd.moellmann@gmail.com> writes:

> I could add a check in the function that does the (goto-char nil), but I
> don't know if that would be only fixing a symptom of something else.

I just had an idea.  What if this deoends on the mini-window.  One of
the functions signalling looks like this:

(defun pixel-scroll-precision-scroll-up-page (delta)
  "Scroll the current window up by DELTA pixels.
Note that this function doesn't work if DELTA is larger than
the height of the current window."
  (let* ((edges (window-edges nil t nil t))
         (max-y (- (nth 3 edges)
                   (nth 1 edges)))
         (usable-height max-y)
         (posn (posn-at-x-y 0 (+ (window-tab-line-height)
                                 (window-header-line-height)
                                 (- max-y delta))))
         (point (posn-point posn))
         (up-point (save-excursion
                     (goto-char point)
                     ^^^ here point is nil
                     (vertical-motion (- (1+ scroll-margin)))
                     (point))))

The documentation of window-edges says it is using the selected window
when its window argument is nil.  The selected window can't be the
mini-window unless the minibuffer is active.

And indeed, when I enter the minibuffer (M-:), and mouse-wheel as
descibed before, no error occurs.

Does that sound plausible?






reply via email to

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