branch: master
commit c3226138c14373f52039835411ebc31cfd68de5c
Author: Oleh Krehel <[email protected]>
Commit: Oleh Krehel <[email protected]>

    ivy.el (ivy--magic-file-slash): Fix pasting "/etc/"
---
 ivy.el | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/ivy.el b/ivy.el
index 431771b..e940227 100644
--- a/ivy.el
+++ b/ivy.el
@@ -2224,6 +2224,10 @@ If SUBEXP is nil, the text properties are applied to the 
whole match."
          (let ((drive-root (match-string 0 ivy-text)))
            (when (file-exists-p drive-root)
              (ivy--cd drive-root))))
+        ((and (file-exists-p ivy-text)
+              (not (string= ivy-text "/"))
+              (file-directory-p ivy-text))
+         (ivy--cd ivy-text))
         ((and (or (> ivy--index 0)
                   (= ivy--length 1)
                   (not (string= ivy-text "/")))

Reply via email to