]> code.delx.au - gnu-emacs-elpa/commitdiff
ivy.el (ivy-read): Fix extra actions for completing-read
authorOleh Krehel <ohwoeowho@gmail.com>
Thu, 28 Jan 2016 20:52:30 +0000 (21:52 +0100)
committerOleh Krehel <ohwoeowho@gmail.com>
Thu, 28 Jan 2016 20:52:30 +0000 (21:52 +0100)
Re #337

ivy.el

diff --git a/ivy.el b/ivy.el
index b9579acde2e3bd2a13e3b19d7909a46914d5bb2b..911fede0f7e1ecfe356753aa66e6c5985af433dd 100644 (file)
--- 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