branch: master
commit b1f587d95aabb15c0817ab924485929246d0351e
Author: Oleh Krehel <[email protected]>
Commit: Oleh Krehel <[email protected]>
ivy.el (ivy--directory-done): Fix "RET" on no input
Fixes #782
---
ivy.el | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/ivy.el b/ivy.el
index 1a675b4..bd2d5f8 100644
--- a/ivy.el
+++ b/ivy.el
@@ -637,7 +637,8 @@ When ARG is t, exit with current text, ignoring the
candidates."
(setq dir (ivy-expand-file-if-directory ivy--current)))
(ivy--cd dir)
(ivy--exhibit))
- ((file-exists-p ivy-text)
+ ((and (not (string= ivy-text ""))
+ (file-exists-p ivy-text))
(ivy--cd (file-name-as-directory ivy-text)))
((or (and (equal ivy--directory "/")
(string-match "\\`[^/]+:.*:.*\\'" ivy-text))