branch: master
commit 147ae80f412926998d49a4c736ad05f9920c05ca
Author: Oleh Krehel <ohwoeo...@gmail.com>
Commit: Oleh Krehel <ohwoeo...@gmail.com>

    Fix an extra action being called for `completing-read'
    
    * ivy.el (ivy-read): `ivy-call' got confused for a combination of
      `completing-read' and `ivy-set-actions t` - since there was no first
      action, the first of the extra actions was assumed to be that.
    
    Now put `identity' as the first action for `completing-read'.
    
    Re syl20bnr/spacemacs#5044
---
 ivy.el |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/ivy.el b/ivy.el
index ea51631..994d192 100644
--- a/ivy.el
+++ b/ivy.el
@@ -1197,7 +1197,9 @@ customizations apply to the current completion session."
                      ("o" ,action "default")
                      ,@extra-actions))
                   ((null action)
-                   (cons 1 extra-actions))
+                   `(1
+                     ("o" identity "default")
+                     ,@extra-actions))
                   (t
                    (delete-dups (append action extra-actions)))))))
   (let ((extra-sources (plist-get ivy--sources-list caller)))

Reply via email to