branch: master
commit ce3c0ecd53c316287dde4585bd89436dd17b36d8
Author: Oleh Krehel <[email protected]>
Commit: Oleh Krehel <[email protected]>

    ivy.el (ivy-completing-read): Adjust :caller
    
    The previous change caused problems with e.g. `read-file-name', since
    then the collection wasn't recognized as `read-file-name-internal'.
---
 ivy.el | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/ivy.el b/ivy.el
index 14a94e9..bfd2c35 100644
--- a/ivy.el
+++ b/ivy.el
@@ -1779,7 +1779,10 @@ INHERIT-INPUT-METHOD is currently ignored."
                 :history history
                 :keymap nil
                 :sort t
-                :caller this-command))))
+                :caller (cond ((called-interactively-p 'any)
+                               this-command)
+                              ((and collection (symbolp collection))
+                               collection))))))
 
 (defvar ivy-completion-beg nil
   "Completion bounds start.")

Reply via email to