branch: master commit 1088078c55b650ccced95f1419b2ade90ea75d07 Author: Oleh Krehel <ohwoeo...@gmail.com> Commit: Oleh Krehel <ohwoeo...@gmail.com>
When selecting a non-existing key in an alist, return that key * ivy.el (ivy-call): Previously, nil was returned. --- ivy.el | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/ivy.el b/ivy.el index 8e12408..eee341c 100644 --- a/ivy.el +++ b/ivy.el @@ -893,12 +893,13 @@ Example use: (let ((action (ivy--get-action ivy-last))) (when action (let* ((collection (ivy-state-collection ivy-last)) - (x (if (and (consp collection) - (consp (car collection))) - (cdr (assoc ivy--current collection)) - (if (equal ivy--current "") - ivy-text - ivy--current)))) + (x (cond ((and (consp collection) + (consp (car collection)) + (cdr (assoc ivy--current collection)))) + ((equal ivy--current "") + ivy-text) + (t + ivy--current)))) (prog1 (funcall action x) (unless (or (eq ivy-exit 'done) (equal (selected-window)