branch: master
commit 9b315e8409779b29df8c0f39c0006fd0cb589c04
Author: Oleh Krehel <ohwoeo...@gmail.com>
Commit: Oleh Krehel <ohwoeo...@gmail.com>

    Use "//" to move to root instead of "/" as before
    
    ivy.el (ivy--exhibit): Update.
    
    This improves the situation with tramp and generally avoids losing the
    current directory by pressing "/" by accident.
    
    Fixes #59
---
 ivy.el |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/ivy.el b/ivy.el
index 97cdb41..53e8057 100644
--- a/ivy.el
+++ b/ivy.el
@@ -688,7 +688,8 @@ Should be run via minibuffer `post-command-hook'."
       (if (string-match "/$" ivy-text)
           (if (member ivy-text ivy--all-candidates)
               (ivy--cd (expand-file-name ivy-text ivy--directory))
-            (ivy--cd "/"))
+            (when (string-match "//$" ivy-text)
+              (ivy--cd "/")))
         (if (string-match "~$" ivy-text)
             (ivy--cd (expand-file-name "~/")))))
     (ivy--insert-minibuffer

Reply via email to