[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/corfu cf75c08 1/4: Go back to prompt with scroll on fir
From: |
ELPA Syncer |
Subject: |
[elpa] externals/corfu cf75c08 1/4: Go back to prompt with scroll on first candidate. (#51) |
Date: |
Mon, 9 Aug 2021 13:57:10 -0400 (EDT) |
branch: externals/corfu
commit cf75c085b95b55f5c08aa58dd9c3c21ba2015dea
Author: JD Smith <93749+jdtsmith@users.noreply.github.com>
Commit: GitHub <noreply@github.com>
Go back to prompt with scroll on first candidate. (#51)
---
corfu.el | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/corfu.el b/corfu.el
index 9d5403b..7dee72d 100644
--- a/corfu.el
+++ b/corfu.el
@@ -726,9 +726,10 @@ completion began less than that number of seconds ago."
(1- corfu--index))))
(defun corfu-scroll-down ()
- "Go back by one page."
+ "Go back by one page, or to the prompt when the first candidate is selected."
(interactive)
- (corfu--goto (max 0 (- corfu--index corfu-count))))
+ (corfu--goto
+ (if (> corfu--index 0) (max 0 (- corfu--index corfu-count)) -1)))
(defun corfu-scroll-up ()
"Go forward by one page."