mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-12-02 08:22:22 +00:00
Fix precision scrolling when there is a scroll margin
* lisp/pixel-scroll.el (pixel-scroll-precision-scroll-down) (pixel-scroll-precision-scroll-up): Take scroll margin into accout.
This commit is contained in:
parent
01a6c0b409
commit
a4ff841154
@ -383,7 +383,7 @@ the height of the current window."
|
||||
(desired-vscroll (cdr (posn-object-x-y desired-pos)))
|
||||
(next-pos (save-excursion
|
||||
(goto-char desired-start)
|
||||
(when (zerop (vertical-motion 1))
|
||||
(when (zerop (vertical-motion (1+ scroll-margin)))
|
||||
(signal 'end-of-buffer nil))
|
||||
(point))))
|
||||
(if (and (< (point) next-pos)
|
||||
@ -419,7 +419,7 @@ the height of the current window."
|
||||
(point (posn-point posn))
|
||||
(up-point (save-excursion
|
||||
(goto-char point)
|
||||
(vertical-motion -1)
|
||||
(vertical-motion (- (1+ scroll-margin)))
|
||||
(point))))
|
||||
(when (> (point) up-point)
|
||||
(when (let ((pos-visible (pos-visible-in-window-p up-point nil t)))
|
||||
|
Loading…
Reference in New Issue
Block a user