emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/pdf-tools 4d53fd2a87 1/2: Disable pixel-scroll-precision-m


From: ELPA Syncer
Subject: [nongnu] elpa/pdf-tools 4d53fd2a87 1/2: Disable pixel-scroll-precision-mode locally if enabled
Date: Thu, 21 Jul 2022 19:58:49 -0400 (EDT)

branch: elpa/pdf-tools
commit 4d53fd2a87ee28eff3b4fa856a8c65d74b5f1a85
Author: Sebastian Hiebl <bastidest@mailbox.org>
Commit: Vedang Manerikar <ved.manerikar@gmail.com>

    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
---
 lisp/pdf-view.el | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lisp/pdf-view.el b/lisp/pdf-view.el
index c2922adb34..7f7e57d52a 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 ()



reply via email to

[Prev in Thread] Current Thread [Next in Thread]