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

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

[elpa] master 9b9885d 33/57: ivy.el (ivy-partial-or-done): Fixup


From: Oleh Krehel
Subject: [elpa] master 9b9885d 33/57: ivy.el (ivy-partial-or-done): Fixup
Date: Tue, 19 May 2015 14:21:33 +0000

branch: master
commit 9b9885da6eb3d260d36c1792313cb0dd053e995d
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>

    ivy.el (ivy-partial-or-done): Fixup
    
    * ivy.el (ivy-partial-or-done): Switch `default-directory' so that
      `minibuffer-complete' is aware of it. Select a directory only if there
      is only one.
---
 ivy.el |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/ivy.el b/ivy.el
index 551ed01..feed8c3 100644
--- a/ivy.el
+++ b/ivy.el
@@ -294,10 +294,11 @@ When called twice in a row, exit the minibuffer with the 
current
 candidate."
   (interactive)
   (if (eq (ivy-state-collection ivy-last) 'read-file-name-internal)
-      (progn
+      (let ((default-directory ivy--directory))
         (minibuffer-complete)
         (setq ivy-text (ivy--input))
-        (when (file-directory-p ivy-text)
+        (when (and (file-directory-p ivy-text)
+                   (= ivy--length 1))
           (ivy--cd (expand-file-name ivy-text))))
     (or (ivy-partial)
         (if (eq this-command last-command)



reply via email to

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