summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Mendler <mail@daniel-mendler.de>2021-12-21 17:49:49 +0100
committerDaniel Mendler <mail@daniel-mendler.de>2021-12-21 17:49:49 +0100
commit3e472cd02800b10d83f5312fc0a67b0744f8945a (patch)
treec7973e265557c08c030a7a17717c06fcf3a9beca
parenta82a0ccb8da95f6d8cc68655670631912431fa3e (diff)
corfu--restore-on-next-command: Restore other window scrolling
See #98
-rw-r--r--corfu.el9
1 files 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'.