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

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

[elpa] master a1e0063 018/272: ivy.el (ivy--reset-state): Don't null ini


From: Oleh Krehel
Subject: [elpa] master a1e0063 018/272: ivy.el (ivy--reset-state): Don't null initial-input
Date: Mon, 25 Apr 2016 10:13:14 +0000

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

    ivy.el (ivy--reset-state): Don't null initial-input
    
    This is specifically for 'read-file-name-internal collection.
    The input needs to be set to nil for e.g. `rgrep', which supplies
    the *absolute* path as `initial-input', resulting in a mess.
    
    For now, don't set input to nil if :action was passed to `ivy-read'.
    
    Fixes #336
---
 ivy.el |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/ivy.el b/ivy.el
index 8ab8139..244d819 100644
--- a/ivy.el
+++ b/ivy.el
@@ -1228,7 +1228,8 @@ This is useful for recursive `ivy-read'."
                            (equal initial-input default-directory)
                            (equal initial-input ""))
                  (setq coll (cons initial-input coll)))
-               (setq initial-input nil)))
+               (unless (ivy-state-action ivy-last)
+                 (setq initial-input nil))))
             ((eq collection 'internal-complete-buffer)
              (setq coll (ivy--buffer-list "" ivy-use-virtual-buffers)))
             ((or (functionp collection)



reply via email to

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