summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Hiebl <bastidest@mailbox.org>2022-07-04 20:48:04 +0200
committerVedang Manerikar <ved.manerikar@gmail.com>2022-07-20 20:14:54 -0700
commit4d53fd2a87ee28eff3b4fa856a8c65d74b5f1a85 (patch)
treee904e26c7d2c71a074da5edbacc771a337e81268
parenta72fc93fb1450772007d55f75e302468c0c44015 (diff)
Disable pixel-scroll-precision-mode locally if enabled
This change disables the emacs 29 `pixel-scroll-precision-mode` (if enabled) which interferes with the `pdf-tools` scrolling mechanism. I think the `pixel-scroll-precision-mode` does not make sense in the context of the `pdf-view` mode, which does pixel based scrolling anyways. After this change, scrolling in a `pdf-view` buffer should work again with `pixel-scroll-precision-mode` enabled. Closes: #56 Closes: #124
-rw-r--r--lisp/pdf-view.el4
1 files changed, 4 insertions, 0 deletions
diff --git a/lisp/pdf-view.el b/lisp/pdf-view.el
index c2922ad..7f7e57d 100644
--- a/lisp/pdf-view.el
+++ b/lisp/pdf-view.el
@@ -334,6 +334,10 @@ PNG images in Emacs buffers."
(setq-local mwheel-scroll-down-function
#'pdf-view-scroll-down-or-previous-page))
+ ;; Disable pixel-scroll-precision-mode locally if enabled
+ (if (bound-and-true-p pixel-scroll-precision-mode)
+ (set (make-local-variable 'pixel-scroll-precision-mode) nil))
+
;; Clearing overlays
(add-hook 'change-major-mode-hook
(lambda ()