GNU bug report logs -
#32002
24.4; Scroll bar start, end not correct
Previous Next
Reported by: Andrew Kurn <kurn <at> sfu.ca>
Date: Fri, 29 Jun 2018 07:37:02 UTC
Severity: wishlist
Tags: fixed
Fixed in version 24.4
Done: Noam Postavsky <npostavs <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
Message #205 received at 32002 <at> debbugs.gnu.org (full text, mbox):
> Date: Sat, 14 Jul 2018 10:01:09 +0200
> From: martin rudalics <rudalics <at> gmx.at>
> CC: 32002 <at> debbugs.gnu.org, kurn <at> sfu.ca
>
> Right, presumably. What happens here is that in 'scroll-bar-drag-1'
> we go to 'point-max' since 'portion-whole' is (1 . 1) and
> 'scroll-bar-scale' returns WHOLE in that case and set the start
> position of that window to 'point-max'. If, in that case, we do
> nothing as in
>
> (defun scroll-bar-drag-1 (event)
> (let* ((start-position (event-start event))
> (window (nth 0 start-position))
> (portion-whole (nth 2 start-position)))
> (unless (= (car portion-whole) (cdr portion-whole))
> (save-excursion
> (with-current-buffer (window-buffer window)
> ;; Calculate position relative to the accessible part of the buffer.
> (goto-char (+ (point-min)
> (scroll-bar-scale portion-whole
> (- (point-max) (point-min)))))
> (vertical-motion 0 window)
> (set-window-start window (point)))))))
>
> the problem is resolved. But I'm afraid that I understand too little
> about overscrolling and the portion/whole stuff to confidently
> recommend such a solution. Hopefully, you will come up with a better
> one.
Not sure I follow: for the problem to be resolved, we need to set
window-start to some position that is not point-max. So who does that
setting in the case in point, with your change in effect?
Or did you mean to disable scrolling-up in this case, and thus remove
the need for scrolling down? Hmm... maybe that's the only solution to
this conundrum, but in that case I think it would be safer to add
scroll-bar-adjust-thumb-portion to your condition about portion-whole.
This bug report was last modified 6 years and 299 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.