]> git.eshelyaron.com Git - emacs.git/commitdiff
Make precision scrolling work on margins and fringes
authorPo Lu <luangruo@yahoo.com>
Fri, 24 Dec 2021 07:35:15 +0000 (15:35 +0800)
committerPo Lu <luangruo@yahoo.com>
Fri, 24 Dec 2021 07:35:39 +0000 (15:35 +0800)
* lisp/pixel-scroll.el (pixel-scroll-precision-mode-map): Add
missing key definitions.

lisp/pixel-scroll.el

index d3b45000239543be710a3c4656cda5ba14f74cf6..b943365a3f59fa4180c6eef4583a4ea9bc499a9b 100644 (file)
@@ -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'.")