]> code.delx.au - gnu-emacs-elpa/commitdiff
ivy.el (ivy--magic-file-slash): Allow "non-existing-dir//"
authorOleh Krehel <ohwoeowho@gmail.com>
Thu, 21 Apr 2016 07:01:21 +0000 (09:01 +0200)
committerOleh Krehel <ohwoeowho@gmail.com>
Thu, 21 Apr 2016 07:01:21 +0000 (09:01 +0200)
Fixes #480

ivy.el

diff --git a/ivy.el b/ivy.el
index 7d705c8af753dcb15adee502c2b814c4591c32df..61103b28f020903acd360e1c6a4f7e56acdd6bd2 100644 (file)
--- a/ivy.el
+++ b/ivy.el
@@ -1963,7 +1963,10 @@ depending on the number of candidates."
                   (= ivy--length 1)
                   (not (string= ivy-text "/")))
               (let ((default-directory ivy--directory))
-                (file-directory-p ivy--current)))
+                (and
+                 (not (equal ivy--current ""))
+                 (file-directory-p ivy--current)
+                 (file-exists-p ivy--current))))
          (ivy--cd (expand-file-name ivy--current ivy--directory)))))
 
 (defun ivy--exhibit ()