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

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

[elpa] master 84e20a3 30/90: Fixup ivy-resume for file completion


From: Oleh Krehel
Subject: [elpa] master 84e20a3 30/90: Fixup ivy-resume for file completion
Date: Tue, 30 Jun 2015 07:28:15 +0000

branch: master
commit 84e20a3082071c2e5a0eb81290f534c91f2e94b1
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>

    Fixup ivy-resume for file completion
    
    * ivy.el (ivy-resume): No longer add the preselect.
    (ivy-read): Don't add initial-input "".
---
 ivy.el |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/ivy.el b/ivy.el
index 8065789..e2e6243 100644
--- a/ivy.el
+++ b/ivy.el
@@ -367,7 +367,9 @@ If the text hasn't changed as a result, forward to 
`ivy-alt-done'."
    :require-match (ivy-state-require-match ivy-last)
    :initial-input ivy-text
    :history (ivy-state-history ivy-last)
-   :preselect (regexp-quote ivy--current)
+   :preselect (unless (eq (ivy-state-collection ivy-last)
+                          'read-file-name-internal)
+                (regexp-quote ivy--current))
    :keymap (ivy-state-keymap ivy-last)
    :update-fn (ivy-state-update-fn ivy-last)
    :sort (ivy-state-sort ivy-last)
@@ -690,7 +692,8 @@ candidates with each input."
                  (ivy--sorted-files default-directory))
            (when initial-input
              (unless (or require-match
-                         (equal initial-input default-directory))
+                         (equal initial-input default-directory)
+                         (equal initial-input ""))
                (setq coll (cons initial-input coll)))
              (setq initial-input nil)))
           ((eq collection 'internal-complete-buffer)



reply via email to

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