From e449f62a79f9acafd0b29df63e1cc177689b4407 Mon Sep 17 00:00:00 2001 From: Po Lu Date: Mon, 6 Dec 2021 09:40:38 +0800 Subject: [PATCH] Fix jittering when precision scrolling over images * lisp/pixel-scroll.el (pixel-scroll-precision-initial-velocity-factor): Default to nil. (pixel-scroll-precision-scroll-down-page): Always set window start. --- lisp/pixel-scroll.el | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/lisp/pixel-scroll.el b/lisp/pixel-scroll.el index 77229844246..2e09f9af2d4 100644 --- a/lisp/pixel-scroll.el +++ b/lisp/pixel-scroll.el @@ -133,7 +133,7 @@ This is only effective if supported by your mouse or touchpad." :type 'float :version "29.1") -(defcustom pixel-scroll-precision-large-scroll-height 70 +(defcustom pixel-scroll-precision-large-scroll-height nil "Pixels that must be scrolled before an animation is performed. Nil means to not interpolate such scrolls." :group 'mouse @@ -441,14 +441,13 @@ the height of the current window." (set-window-vscroll nil (+ (window-vscroll nil t) delta) t) - (unless (eq (window-start) desired-start) - (set-window-start nil (if (zerop (window-hscroll)) - desired-start - (save-excursion - (goto-char desired-start) - (beginning-of-visual-line) - (point))) - t)) + (set-window-start nil (if (zerop (window-hscroll)) + desired-start + (save-excursion + (goto-char desired-start) + (beginning-of-visual-line) + (point))) + t) (set-window-vscroll nil desired-vscroll t)) (if (and (or (< (point) next-pos)) (let ((pos-visibility (pos-visible-in-window-p next-pos nil t))) -- 2.39.2