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

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

[elpa] master 115efb7 170/399: ivy.el (ivy--sorted-files): Work around a


From: Oleh Krehel
Subject: [elpa] master 115efb7 170/399: ivy.el (ivy--sorted-files): Work around all-completions returning $$
Date: Sat, 20 Jul 2019 14:57:17 -0400 (EDT)

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

    ivy.el (ivy--sorted-files): Work around all-completions returning $$
    
    If a file "foobar$" is present in the directory,
    
        (all-completions "" #'read-file-name-internal)
    
    returns "foobar$$". It's not clear why this is.
    
    Fixes #2012
---
 ivy.el | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/ivy.el b/ivy.el
index dfe841c..4cc60d4 100644
--- a/ivy.el
+++ b/ivy.el
@@ -1746,8 +1746,9 @@ May supersede `ivy-initial-inputs-alist'."
 Directories come first."
   (let* ((default-directory dir)
          (seq (condition-case nil
-                  (all-completions "" #'read-file-name-internal
-                                   (ivy-state-predicate ivy-last))
+                  (mapcar (lambda (s) (replace-regexp-in-string "\\$\\$" "$" 
s))
+                          (all-completions "" #'read-file-name-internal
+                                           (ivy-state-predicate ivy-last)))
                 (error
                  (directory-files dir))))
          sort-fn)



reply via email to

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