summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKen Huang <whatacold@gmail.com>2025-12-29 11:41:49 +0800
committerGitHub <noreply@github.com>2025-12-29 09:11:49 +0530
commit1ad2b7511a98d77f9d1ad8d25be8dd4c9f48f97a (patch)
tree1a6532fad58b8122efc1342a60c690933a1b2a6f
parent4b78120e5f7e3ec38e198b5638c3a581bdc9b882 (diff)
feat(pdf-view): enable scroll-other-window support
Add remappings for scroll-up-command and scroll-down-command so that scroll-other-window and scroll-other-window-down work with pdf-view buffers. This addresses a commonly requested feature: - https://github.com/politza/pdf-tools/issues/55 - https://lists.gnu.org/archive/html/emacs-devel/2015-12/msg01416.html - https://www.reddit.com/r/emacs/comments/10pkhko/ Closes: #280 Author: @whatacold
-rw-r--r--lisp/pdf-view.el2
1 files changed, 2 insertions, 0 deletions
diff --git a/lisp/pdf-view.el b/lisp/pdf-view.el
index c94fe1a..8dbb547 100644
--- a/lisp/pdf-view.el
+++ b/lisp/pdf-view.el
@@ -291,6 +291,8 @@ regarding display of the region in the later function.")
(define-key map [remap forward-page] 'pdf-view-next-page-command)
(define-key map [remap backward-page] 'pdf-view-previous-page-command)
(define-key map (kbd "SPC") 'pdf-view-scroll-up-or-next-page)
+ (define-key map [remap scroll-up-command] #'pdf-view-scroll-up-or-next-page)
+ (define-key map [remap scroll-down-command] #'pdf-view-scroll-down-or-previous-page)
(define-key map (kbd "S-SPC") 'pdf-view-scroll-down-or-previous-page)
(define-key map (kbd "DEL") 'pdf-view-scroll-down-or-previous-page)
(define-key map (kbd "C-n") 'pdf-view-next-line-or-next-page)