Should vertico allow prompt selection when vertico-preselect
is set to first
?
#488
-
Hi, According to
However when setting I found it's possible do it adding @@ -355,6 +355,7 @@
(vertico--hilit . ,(or hl #'identity))
(vertico--allow-prompt . ,(and (not (eq vertico-preselect 'no-prompt))
(or def-missing (eq vertico-preselect 'prompt)
+ (eq vertico-preselect 'first)
(memq minibuffer--require-match
'(nil confirm confirm-after-completion)))))
(vertico--lock-candidate . ,lock) That would make more easy for submit a empty string for some commands instead using |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
|
Beta Was this translation helpful? Give feedback.
No, this would then give the impression that submitting arbitrary input is supported. We could however allow selecting the prompt only in the edge case where the prompt is empty. But then, I intentionally didn't implement this since I consider the concept of the "null completion" (submitting empty input) a design mistake. Many commands don't even support it - most famously
M-x
! TryM-x M-RET
. This means to trigger the "mistake" you at least have to pressM-RET
.