diff options
| author | Daniel Mendler <mail@daniel-mendler.de> | 2025-12-07 18:28:25 +0100 |
|---|---|---|
| committer | Daniel Mendler <mail@daniel-mendler.de> | 2025-12-07 18:28:25 +0100 |
| commit | 3159a412dcc8c82a89f458c3a5bfd06f22c59ee5 (patch) | |
| tree | 83e22346118d4f4e50238214e105b60ac397ebef /extensions/corfu-popupinfo.el | |
| parent | f9dfad55ebac46bfcb9ade490fa3d058a0913c81 (diff) | |
corfu-popupinfo: Improve scrolling speed
Diffstat (limited to 'extensions/corfu-popupinfo.el')
| -rw-r--r-- | extensions/corfu-popupinfo.el | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/extensions/corfu-popupinfo.el b/extensions/corfu-popupinfo.el index 8506705..3451030 100644 --- a/extensions/corfu-popupinfo.el +++ b/extensions/corfu-popupinfo.el @@ -426,19 +426,23 @@ See `corfu-popupinfo-end' for the argument N." If ARG is omitted or nil, scroll upward by a near full screen. See `scroll-up' for details. If the info popup is not visible, the other window is scrolled." - (interactive "p") + (interactive "P") (if (corfu-popupinfo--visible-p) (with-selected-frame corfu-popupinfo--frame (with-current-buffer corfu-popupinfo--buffer - (scroll-up n))) + (scroll-up-command n))) (scroll-other-window n))) (defun corfu-popupinfo-scroll-down (&optional n) "Scroll text of info popup window down N lines. See `corfu-popupinfo-scroll-up' for more details." - (interactive "p") - (corfu-popupinfo-scroll-up (- (or n 1)))) + (interactive "P") + (if (corfu-popupinfo--visible-p) + (with-selected-frame corfu-popupinfo--frame + (with-current-buffer corfu-popupinfo--buffer + (scroll-down-command n))) + (scroll-other-window-down n))) (defun corfu-popupinfo--toggle (fun) "Set documentation getter FUN and toggle popup." |
