branch: master
commit f494c0a814d93ccfced80c66343ed133eae95a44
Author: fabacino <[email protected]>
Commit: fabacino <[email protected]>
ivy.el (ivy--prompt-selectable-p): Fix require-match condition
The prompt was not selectable, if predicate :require-match was set to
'confirm or 'confirm-after-completion.
---
ivy.el | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/ivy.el b/ivy.el
index 155f1fe..00a5499 100644
--- a/ivy.el
+++ b/ivy.el
@@ -550,7 +550,8 @@ candidate, not the prompt."
(defun ivy--prompt-selectable-p ()
"Return t if the prompt line is selectable."
(and ivy-use-selectable-prompt
- (not (ivy-state-require-match ivy-last))))
+ (memq (ivy-state-require-match ivy-last)
+ '(nil confirm confirm-after-completion))))
(defun ivy--prompt-selected-p ()
"Return t if the prompt line is selected."