diff options
| author | aikrahguzar <88336724+aikrahguzar@users.noreply.github.com> | 2025-12-29 04:44:57 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-12-29 09:14:57 +0530 |
| commit | 0cca3b6925da8e1e128259f6c63250cc99c96cb2 (patch) | |
| tree | 556f591f5019001a7625e1b10cfe91b2b6f6ecc3 /lisp/pdf-view.el | |
| parent | 4c634387bafee20407de67f0d11eb6c4a225cca9 (diff) | |
feat(pdf-view): enable horizontal mouse wheel scrolling
Add support for horizontal scrolling using mouse wheel by setting
mwheel-scroll-left/right-function to image-mode's scroll functions.
Includes boundp checks for compatibility with older Emacs versions.
Closes: #234
Author: @aikrahguzar
Diffstat (limited to 'lisp/pdf-view.el')
| -rw-r--r-- | lisp/pdf-view.el | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lisp/pdf-view.el b/lisp/pdf-view.el index 8dbb547..e94762b 100644 --- a/lisp/pdf-view.el +++ b/lisp/pdf-view.el @@ -378,6 +378,14 @@ PNG images in Emacs buffers." (setq-local mwheel-scroll-down-function #'pdf-view-scroll-down-or-previous-page)) + (if (boundp 'mwheel-scroll-left-function) + (setq-local mwheel-scroll-left-function + #'image-scroll-left)) + + (if (boundp 'mwheel-scroll-right-function) + (setq-local mwheel-scroll-right-function + #'image-scroll-right)) + ;; 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)) |
