-
-
Notifications
You must be signed in to change notification settings - Fork 112
Open
Description
Scrolling backwards from a hydra scrolls significantly less than expected (about half a page less). Calling the same commands from bare keybinds is unaffected.
minimal init.el
(defvar bootstrap-version)
(let ((bootstrap-file
(expand-file-name
"straight/repos/straight.el/bootstrap.el"
(or (bound-and-true-p straight-base-dir)
user-emacs-directory)))
(bootstrap-version 7))
(unless (file-exists-p bootstrap-file)
(with-current-buffer
(url-retrieve-synchronously
"https://raw.githubusercontent.com/radian-software/straight.el/develop/install.el"
'silent 'inhibit-cookies)
(goto-char (point-max))
(eval-print-last-sexp)))
(load bootstrap-file nil 'nomessage))
(straight-use-package 'hydra)
(require 'view)
(defhydra hydra-view ()
("u" View-scroll-half-page-backward "View back")
("U" View-scroll-page-backward "View back"))
(keymap-set global-map "C-c v" 'hydra-view/body)
(keymap-set global-map "C-c u" 'View-scroll-page-backward)
What I tried:
- fill a buffer with a few screens of text, and scroll to the end.
- call View-scroll-half-page-backward from a hydra (
C-c u u u) - call View-scroll-page-backward from a hydra (
C-c v U U U) - call View-scroll-page-backward directly (
C-c U)
What I expected to happen:
- at the end of a large buffer
- view scrolls back half a screenful at a time
- view scrolls back 1 screenful at a time
- view scrolls back 1 screenful at a time
What actually happened:
- at the end of a large buffer
- view scrolls back a few lines at a time, or not at all
- view scrolls back half a screenful at a time
- view scrolls back 1 screenful at a time
Other notes:
It's not just view that's affected. I tried my own versions based on scroll-down and they also exhibit the same behaviour when called from a hydra.
(defun scroll-half-page-down-command ()
"scroll down half the page"
(interactive)
(scroll-down-command (/ (window-body-height) 2)))
(defun scroll-half-page-down ()
"scroll down half the page"
(interactive)
(scroll-down (/ (window-body-height) 2)))
Scrolling forward appears unaffected.
Metadata
Metadata
Assignees
Labels
No labels