GNU bug report logs -
#65214
29.1; Tall images in 'image-mode' can't be scrolled with 'pixel-scroll-precision-mode' on
Previous Next
Full log
Message #11 received at 65214 <at> debbugs.gnu.org (full text, mbox):
Hi Po,
In this case it is not the recentering which is causing this problem,
it is rather the binding for next-pos in
pixel-scroll-precision-scroll-down-page which is the issue. The
binding signals an error when downward vertical motion is not
possible. However in this scenario scrolling can still be done.
Replacing that binding with desired-start allow me to scroll the
images.
This change for example allows for scrolling tall images,
@@ -524,10 +524,12 @@ pixel-scroll-precision-scroll-down-page
(next-pos (save-excursion
(goto-char desired-start)
(when (zerop (vertical-motion (1+ scroll-margin)))
- (set-window-start nil desired-start)
- (signal 'end-of-buffer nil))
+ (unless (let ((remaining-bottom (nth 3 (pos-visible-in-window-p desired-start nil t))))
+ (and remaining-bottom (not (zerop remaining-bottom))))
+ (signal 'end-of-buffer nil)))
(while (when-let ((posn (posn-at-point)))
- (< (cdr (posn-x-y posn)) delta))
+ (and (< (point) (point-min))
+ (< (cdr (posn-x-y posn)) delta)))
(when (zerop (vertical-motion 1))
(set-window-start nil desired-start)
(signal 'end-of-buffer nil)))
I am not sure it is the correct change since I don't understand the
while loop but comparing 'point' and 'point-min' doesn't seem the write
thing there. On the others hand if there is 'point-min' is 1 and
'point-max' 2, (cdr (posn-x-y posn))
Po Lu <luangruo <at> yahoo.com> writes:
> This is a known limitation of pixel-scroll-precision-mode: redisplay's
> automatic recentering impededs adjustment of the vscroll as the image
> moves outside of the window's text area. Unfortunately, it's not slated
> to be fixed any time soon.
In this case it is not the recentering which is causing this problem,
it is rather the binding for next-pos in
pixel-scroll-precision-scroll-down-page which is the issue. The
binding signals an error when downward vertical motion is not
possible. However in this scenario scrolling can still be done.
Replacing that binding with desired-start allow me to scroll the
images.
This change for example allows for scrolling tall images,
@@ -524,10 +524,12 @@ pixel-scroll-precision-scroll-down-page
(next-pos (save-excursion
(goto-char desired-start)
(when (zerop (vertical-motion (1+ scroll-margin)))
- (set-window-start nil desired-start)
- (signal 'end-of-buffer nil))
+ (unless (let ((remaining-bottom (nth 3 (pos-visible-in-window-p desired-start nil t))))
+ (and remaining-bottom (not (zerop remaining-bottom))))
+ (signal 'end-of-buffer nil)))
(while (when-let ((posn (posn-at-point)))
- (< (cdr (posn-x-y posn)) delta))
+ (and (< (point) (point-min))
+ (< (cdr (posn-x-y posn)) delta)))
(when (zerop (vertical-motion 1))
(set-window-start nil desired-start)
(signal 'end-of-buffer nil)))
I am not sure it is the correct change since I don't understand the
while loop but comparing 'point' and 'point-min' doesn't seem the write
thing there. On the others hand if there is 'point-min' is 1 and
'point-max' 2, (cdr (posn-x-y posn)) is always zero, so that check makes
the loop terminate without signaling an error.
The behavior is also sub optimal in that it allows for scrolling past
the lower edge of the image but how much depends on the speed of the
scrolling, but that can be fixed easily.
Rahguzar
This bug report was last modified 1 year and 349 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.