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

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

[elpa] externals/vertico 9f306af 1/2: vertico-first: Jump to the prompt


From: Protesilaos Stavrou
Subject: [elpa] externals/vertico 9f306af 1/2: vertico-first: Jump to the prompt if first candidate is selected
Date: Sat, 17 Apr 2021 10:26:07 -0400 (EDT)

branch: externals/vertico
commit 9f306afd833ee8698a2b711748b2aca86a1a5434
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>

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

diff --git a/vertico.el b/vertico.el
index 6bd97df..c2192aa 100644
--- a/vertico.el
+++ b/vertico.el
@@ -471,9 +471,9 @@
              (min index (- vertico--total 1)))))
 
 (defun vertico-first ()
-  "Go to first candidate."
+  "Go to first candidate, or to the prompt when the first candidate is 
selected."
   (interactive)
-  (vertico--goto 0))
+  (vertico--goto (if (> vertico--index 0) 0 -1)))
 
 (defun vertico-last ()
   "Go to last candidate."



reply via email to

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