branch: externals/corfu
commit 3e472cd02800b10d83f5312fc0a67b0744f8945a
Author: Daniel Mendler <[email protected]>
Commit: Daniel Mendler <[email protected]>
corfu--restore-on-next-command: Restore other window scrolling
See #98
---
corfu.el | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/corfu.el b/corfu.el
index e514b65..0682ac6 100644
--- a/corfu.el
+++ b/corfu.el
@@ -898,11 +898,12 @@ there hasn't been any input, then quit."
(restore (make-symbol "corfu--restore")))
(fset restore
(lambda ()
- (when (memq this-command '(corfu-quit corfu-reset))
- (setq this-command #'ignore))
- (remove-hook 'pre-command-hook restore)
(setq other-window-scroll-buffer other)
- (set-window-configuration config)))
+ (unless (memq this-command '(scroll-other-window
scroll-other-window-down))
+ (when (memq this-command '(corfu-quit corfu-reset))
+ (setq this-command #'ignore))
+ (remove-hook 'pre-command-hook restore)
+ (set-window-configuration config))))
(add-hook 'pre-command-hook restore)))
;; Company support, taken from `company.el', see `company-show-doc-buffer'.