Fix jittering when precision scrolling over images
authorPo Lu <luangruo@yahoo.com>
Mon, 6 Dec 2021 01:40:38 +0000 (09:40 +0800)
committerPo Lu <luangruo@yahoo.com>
Mon, 6 Dec 2021 01:41:49 +0000 (09:41 +0800)
* 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

index 772298442462b16026c38bb00bc5eb850d900325..2e09f9af2d434288c04bec36412b28326d2638e4 100644 (file)
@@ -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)))