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

    ivy.el (ivy-read): Fix extra actions for completing-read
    
    Re #337
---
 ivy.el |   13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/ivy.el b/ivy.el
index b9579ac..911fede 100644
--- a/ivy.el
+++ b/ivy.el
@@ -1119,11 +1119,14 @@ customizations apply to the current completion session."
                                (plist-get ivy--actions-list this-command))))
     (when extra-actions
       (setq action
-            (if (functionp action)
-                `(1
-                  ("o" ,action "default")
-                  ,@extra-actions)
-              (delete-dups (append action extra-actions))))))
+            (cond ((functionp action)
+                   `(1
+                     ("o" ,action "default")
+                     ,@extra-actions))
+                  ((null action)
+                   (cons 1 extra-actions))
+                  (t
+                   (delete-dups (append action extra-actions)))))))
   (let ((recursive-ivy-last (and (active-minibuffer-window) ivy-last)))
     (setq ivy-last
           (make-ivy-state

Reply via email to