branch: master
commit 632af83c1804fb5e3c78ad824b673c5b2dfb86f9
Author: Oleh Krehel <[email protected]>
Commit: Oleh Krehel <[email protected]>
ivy.el (ivy-done): Fixup
---
ivy.el | 26 ++++++++++++--------------
1 files changed, 12 insertions(+), 14 deletions(-)
diff --git a/ivy.el b/ivy.el
index dfcb266..7311077 100644
--- a/ivy.el
+++ b/ivy.el
@@ -185,23 +185,21 @@ When non-nil, it should contain one %d.")
((zerop ivy--length)
(if (memq ivy-require-match
'(nil confirm confirm-after-completion))
- (if (= ivy--length 0)
- t
+ (progn
(insert ivy-text)
(setq ivy-exit 'done))
- (progn
- (unless (string-match "match required" ivy--prompt)
- (setq ivy--prompt
- (if (string-match ": $" ivy--prompt)
- (concat
- (substring ivy--prompt 0 -2)
- " (match required): ")
+ (unless (string-match "match required" ivy--prompt)
+ (setq ivy--prompt
+ (if (string-match ": $" ivy--prompt)
(concat
- ivy--prompt
- "(match required) "))))
- (insert ivy-text)
- (ivy--exhibit)
- nil)))
+ (substring ivy--prompt 0 -2)
+ " (match required): ")
+ (concat
+ ivy--prompt
+ "(match required) "))))
+ (insert ivy-text)
+ (ivy--exhibit)
+ nil))
(t
(insert ivy--current)
(setq ivy-exit 'done)))