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

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

[elpa] externals/ivy-hydra 41bd988 082/395: ivy.el (ivy-alt-done): In an


From: Basil L. Contovounesios
Subject: [elpa] externals/ivy-hydra 41bd988 082/395: ivy.el (ivy-alt-done): In an empty directory with no input return this directory
Date: Thu, 25 Feb 2021 08:31:36 -0500 (EST)

branch: externals/ivy-hydra
commit 41bd9886a5206d24f31cc3c4e33f5c5d72bff408
Author: Oleh Krehel <ohwoeowho@gmail.com>
Commit: Oleh Krehel <ohwoeowho@gmail.com>

    ivy.el (ivy-alt-done): In an empty directory with no input return this 
directory
    
    Fixes #2368
---
 ivy.el | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/ivy.el b/ivy.el
index 6ad7d8e..1748de3 100644
--- a/ivy.el
+++ b/ivy.el
@@ -1035,6 +1035,12 @@ contains a single candidate.")
   "Handle exit from the minibuffer when completing file names."
   (let ((dir (ivy--handle-directory ivy-text)))
     (cond
+      ((equal (ivy-state-current ivy-last) (ivy-state-def ivy-last))
+       (ivy-done))
+      ((and (ivy-state-require-match ivy-last)
+            (equal ivy-text "")
+            (null ivy--old-cands))
+       (ivy-immediate-done))
       (dir
        (let ((inhibit-message t))
          (ivy--cd dir)))



reply via email to

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