emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/corfu 10660b4 07/14: corfu-first: Jump to the prompt if


From: Protesilaos Stavrou
Subject: [elpa] externals/corfu 10660b4 07/14: corfu-first: Jump to the prompt if first candidate is selected
Date: Sat, 17 Apr 2021 10:25:42 -0400 (EDT)

branch: externals/corfu
commit 10660b4c72ddf055ad398bf135bf63bee77d1f41
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>

    corfu-first: Jump to the prompt if first candidate is selected
---
 corfu.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/corfu.el b/corfu.el
index 2040dbe..f71ec4e 100644
--- a/corfu.el
+++ b/corfu.el
@@ -454,9 +454,9 @@ If `line-spacing/=nil' or in text-mode, the background 
color is used instead.")
   (corfu--goto (+ corfu--index corfu-count)))
 
 (defun corfu-first ()
-  "Go to first candidate."
+  "Go to first candidate, or to the prompt when the first candidate is 
selected."
   (interactive)
-  (corfu--goto 0))
+  (corfu--goto (if (> corfu--index 0) 0 -1)))
 
 (defun corfu-last ()
   "Go to last candidate."



reply via email to

[Prev in Thread] Current Thread [Next in Thread]