We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
That makes scroll-{up,down} unable to reach the top and bottom of the buffer.
Reproduction script:
(setq user-emacs-directory (make-temp-file "temp-emacs-dir--" 'tmpdir "/")) (setq package-user-dir (concat user-emacs-directory "elpa/")) ;; Add hydra source code (add-to-list 'load-path "~/repos/emacs-hydra") ;; --------------------------------------------------------------------------- (require 'hydra) (defvar hydra-active-p nil) (define-advice scroll-up (:before (&optional arg) debug) (message "==> [scroll up] buffer: %s, window height: %s, hydra-active-p: %s" (current-buffer) (window-height) hydra-active-p)) (define-advice scroll-down (:before (&optional arg) debug) (message "==> [scroll down] buffer: %s, window height: %s, hydra-active-p: %s" (current-buffer) (window-height) hydra-active-p)) (defhydra hydra-scroll (:hint nil) " 1 2 3 4 5 _C-v_: Scroll up 6 _M-v_: Scrool down 7 8 9 10 " ("C-v" (let ((hydra-active-p t)) (scroll-up))) ("M-v" (let ((hydra-active-p t)) (scroll-down)))) (global-set-key (kbd "C-c h") #'hydra-scroll/body) (add-hook 'emacs-startup-hook (lambda () (display-line-numbers-mode 1) (view-echo-area-messages) (save-excursion (insert "\ Steps to reproduce: 1. Press C-v to scroll window 2. Check the window height printed in *Messages* buffer. 3. Press C-c h to active hydra 4. Press C-v to scroll window 5. Check the window height printed in *Messages* buffer. The window height of the two prints should be different."))))
The text was updated successfully, but these errors were encountered:
The correct window size can be get in the timer:
- ("C-v" (let ((hydra-active-p t)) (scroll-up))) + ("C-v" (run-with-timer 0 nil (lambda () + (let ((hydra-active-p t)) + (scroll-up)))))
Sorry, something went wrong.
No branches or pull requests
That makes scroll-{up,down} unable to reach the top and bottom of the buffer.
Reproduction script:
The text was updated successfully, but these errors were encountered: