]> code.delx.au - gnu-emacs-elpa/commitdiff
ivy.el (ivy--directory-done): Fix when ivy-text is a dir
authorOleh Krehel <ohwoeowho@gmail.com>
Mon, 21 Mar 2016 13:26:43 +0000 (14:26 +0100)
committerOleh Krehel <ohwoeowho@gmail.com>
Mon, 21 Mar 2016 13:26:43 +0000 (14:26 +0100)
But when it's different from `ivy--current'.

Fixes #448

ivy.el

diff --git a/ivy.el b/ivy.el
index 386f01ce5634aaa900442d6e0aea157dd552daa5..ed0f232d5dab890591237edb25a7b63e0cce7db8 100644 (file)
--- a/ivy.el
+++ b/ivy.el
@@ -552,14 +552,10 @@ When ARG is t, exit with current text, ignoring the candidates."
        (setq dir (concat ivy-text ivy--directory))
        (ivy--cd dir)
        (ivy--exhibit))
-      ((or
-        (and
-         (not (string= ivy-text ""))
-         (setq dir (ivy-expand-file-if-directory ivy-text)))
-        (and
-         (> ivy--length 0)
-         (not (string= ivy--current "./"))
-         (setq dir (ivy-expand-file-if-directory ivy--current))))
+      ((and
+        (> ivy--length 0)
+        (not (string= ivy--current "./"))
+        (setq dir (ivy-expand-file-if-directory ivy--current)))
        (ivy--cd dir)
        (ivy--exhibit))
       ((or (and (equal ivy--directory "/")