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

    ivy.el (ivy-read): Fix docstring
    
    The ACTION arg is a cons cell for an alist COLLECTION.
    
    Fixes #2201
---
 ivy.el | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/ivy.el b/ivy.el
index 0499c54..e202db7 100644
--- a/ivy.el
+++ b/ivy.el
@@ -1993,7 +1993,8 @@ When SORT is non-nil, `ivy-sort-functions-alist' 
determines how
 to sort candidates before displaying them.
 
 ACTION is a function to call after selecting a candidate.
-It takes the candidate, which is a string, as its only argument.
+It takes one argument, the selected candidate. If COLLECTION is
+an alist, the argument is a cons cell, otherwise it's a string.
 
 MULTI-ACTION, when non-nil, is called instead of ACTION when
 there are marked candidates. It takes the list of candidates as
@@ -2069,10 +2070,10 @@ customizations apply to the current completion session."
                          (car ivy--all-candidates))
                    (setq ivy-exit 'done))
                (read-from-minibuffer
-                          prompt
-                          (ivy-state-initial-input ivy-last)
-                          (make-composed-keymap keymap ivy-minibuffer-map)
-                          nil
+                prompt
+                (ivy-state-initial-input ivy-last)
+                (make-composed-keymap keymap ivy-minibuffer-map)
+                nil
                 hist))
              (when (eq ivy-exit 'done)
                (let ((item (if ivy--directory

Reply via email to