]> code.delx.au - gnu-emacs-elpa/commitdiff
ivy.el (ivy-done): Update wrt globs
authorOleh Krehel <ohwoeowho@gmail.com>
Thu, 23 Apr 2015 11:08:22 +0000 (13:08 +0200)
committerOleh Krehel <ohwoeowho@gmail.com>
Thu, 23 Apr 2015 11:08:22 +0000 (13:08 +0200)
Re #55

ivy.el

diff --git a/ivy.el b/ivy.el
index 89c6e5151bb0e063c4a845ea06ca1620d4f45c43..9019296189901259c23a1d3759051cf8f44beb04 100644 (file)
--- a/ivy.el
+++ b/ivy.el
@@ -171,12 +171,12 @@ When non-nil, it should contain one %d.")
   (delete-minibuffer-contents)
   (when (cond (ivy--directory
                (insert
-                (cond ((string= ivy-text "")
+                (cond ((string-match "\\*" ivy--current)
+                       ivy--current)
+                      ((string= ivy-text "")
                        (if (equal ivy--current "./")
                            ivy--directory
-                         (if (string-match "\\*" ivy--current)
-                             ivy--current
-                           (expand-file-name ivy--current ivy--directory))))
+                         (expand-file-name ivy--current ivy--directory)))
                       ((zerop ivy--length)
                        (if (string-match "\\*" ivy-text)
                            ivy-text
@@ -678,6 +678,8 @@ When GREEDY is non-nil, join words in a greedy way."
       ;; get out of the prompt area
       (constrain-to-field nil (point-max)))))
 
+(defvar inhibit-message)
+
 (defun ivy--exhibit ()
   "Insert Ivy completions display.
 Should be run via minibuffer `post-command-hook'."