From c9f05cbe3fc7290cc4874afa378cdf8062e84e2f Mon Sep 17 00:00:00 2001 From: Po Lu Date: Fri, 24 Dec 2021 15:35:15 +0800 Subject: [PATCH] Make precision scrolling work on margins and fringes * lisp/pixel-scroll.el (pixel-scroll-precision-mode-map): Add missing key definitions. --- lisp/pixel-scroll.el | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lisp/pixel-scroll.el b/lisp/pixel-scroll.el index d3b45000239..b943365a3f5 100644 --- a/lisp/pixel-scroll.el +++ b/lisp/pixel-scroll.el @@ -108,6 +108,18 @@ is always with pixel resolution.") (define-key map [vertical-scroll-bar wheel-down] #'pixel-scroll-precision) (define-key map [vertical-scroll-bar wheel-up] #'pixel-scroll-precision) (define-key map [vertical-scroll-bar touch-end] #'pixel-scroll-start-momentum) + (define-key map [left-margin wheel-down] #'pixel-scroll-precision) + (define-key map [left-margin wheel-up] #'pixel-scroll-precision) + (define-key map [left-margin touch-end] #'pixel-scroll-start-momentum) + (define-key map [right-margin wheel-down] #'pixel-scroll-precision) + (define-key map [right-margin wheel-up] #'pixel-scroll-precision) + (define-key map [right-margin touch-end] #'pixel-scroll-start-momentum) + (define-key map [left-fringe wheel-down] #'pixel-scroll-precision) + (define-key map [left-fringe wheel-up] #'pixel-scroll-precision) + (define-key map [left-fringe touch-end] #'pixel-scroll-start-momentum) + (define-key map [right-fringe wheel-down] #'pixel-scroll-precision) + (define-key map [right-fringe wheel-up] #'pixel-scroll-precision) + (define-key map [right-fringe touch-end] #'pixel-scroll-start-momentum) map) "The key map used by `pixel-scroll-precision-mode'.") -- 2.39.2