emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] master 2b7a97d 4/5: Allow to complete dir with "/" if it's a perf


From: Oleh Krehel
Subject: [elpa] master 2b7a97d 4/5: Allow to complete dir with "/" if it's a perfect match
Date: Fri, 17 Apr 2015 11:50:10 +0000

branch: master
commit 2b7a97d44dfa0630928fdc107c784d8f352caf3c
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>

    Allow to complete dir with "/" if it's a perfect match
    
    * ivy.el (ivy--exhibit): Update.
---
 ivy.el |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/ivy.el b/ivy.el
index 1c82514..6d70fcf 100644
--- a/ivy.el
+++ b/ivy.el
@@ -480,7 +480,9 @@ Should be run via minibuffer `post-command-hook'."
   (ivy--cleanup)
   (when ivy--directory
     (if (string-match "/$" ivy-text)
-        (ivy--cd "/")
+        (if (member ivy-text ivy--all-candidates)
+            (ivy--cd (expand-file-name ivy-text ivy--directory))
+          (ivy--cd "/"))
       (if (string-match "~$" ivy-text)
           (ivy--cd (expand-file-name "~/")))))
   (let ((text (ivy-completions



reply via email to

[Prev in Thread] Current Thread [Next in Thread]