]> git.eshelyaron.com Git - emacs.git/commitdiff
Use CUA functions to scroll pages with pixel-scroll-scroll-mode
authorMarkus Kopp <markus.kopp@student.uibk.ac.at>
Wed, 6 Apr 2022 09:27:19 +0000 (17:27 +0800)
committerPo Lu <luangruo@yahoo.com>
Wed, 6 Apr 2022 09:30:20 +0000 (17:30 +0800)
* lisp/pixel-scroll.el (pixel-scroll-interpolate-down)
(pixel-scroll-interpolate-up): Use `cua-scroll-up' and
`cua-scroll-down' to scroll if
`pixel-scroll-precision-interpolate-page' is off.  (bug#54696)

lisp/pixel-scroll.el

index bfe48ef1f9048fbcc9b06b841ef23b123aca050a..688a054896b2e407e1c64640b87ca41cb5ffeb68 100644 (file)
@@ -90,6 +90,7 @@
 (require 'mwheel)
 (require 'subr-x)
 (require 'ring)
+(require 'cua-base)
 
 (defvar pixel-wait 0
   "Idle time on each step of pixel scroll specified in second.
@@ -803,14 +804,14 @@ It is a vector of the form [ VELOCITY TIME SIGN ]."
   (interactive)
   (if pixel-scroll-precision-interpolate-page
       (pixel-scroll-precision-interpolate (- (window-text-height nil t)))
-    (scroll-up)))
+    (cua-scroll-up)))
 
 (defun pixel-scroll-interpolate-up ()
   "Interpolate a scroll upwards by one page."
   (interactive)
   (if pixel-scroll-precision-interpolate-page
       (pixel-scroll-precision-interpolate (window-text-height nil t))
-    (scroll-down)))
+    (cua-scroll-down)))
 
 ;;;###autoload
 (define-minor-mode pixel-scroll-precision-mode