branch: master
commit ea6ef8111a24ac468eae3b68f59108c02d2960aa
Author: Troy Hinckley <[email protected]>
Commit: Oleh Krehel <[email protected]>

    Allow recursive minibuffers to use ivy-display-function-alist
    
    Fixes #1995
---
 ivy.el | 23 ++++++++++++-----------
 1 file changed, 12 insertions(+), 11 deletions(-)

diff --git a/ivy.el b/ivy.el
index d0b4d89..b41a6be 100644
--- a/ivy.el
+++ b/ivy.el
@@ -1870,17 +1870,18 @@ customizations apply to the current completion session."
                           (list (car source) (funcall (car source)))
                           ivy--extra-candidates))))))
       (setq ivy--extra-candidates '((original-source)))))
-  (let ((ivy-recursive-last (and (active-minibuffer-window) ivy-last))
-        (transformer-fn
-         (plist-get ivy--display-transformers-list
-                    (cond (caller)
-                          ((functionp collection)
-                           collection))))
-        (ivy-display-function
-         (unless (window-minibuffer-p)
-           (or ivy-display-function
-               (ivy-alist-setting ivy-display-functions-alist caller))))
-        (height (ivy--height caller)))
+  (let* ((ivy-recursive-last (and (active-minibuffer-window) ivy-last))
+         (transformer-fn
+          (plist-get ivy--display-transformers-list
+                     (cond (caller)
+                           ((functionp collection)
+                            collection))))
+         (ivy-display-function
+          (when (or ivy-recursive-last
+                    (not (window-minibuffer-p)))
+            (or ivy-display-function
+                (ivy-alist-setting ivy-display-functions-alist caller))))
+         (height (ivy--height caller)))
     (setq ivy-last
           (make-ivy-state
            :prompt prompt

Reply via email to