emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/ivy-hydra 1883499 217/395: ivy.el (ivy-auto-shrink-mini


From: Basil L. Contovounesios
Subject: [elpa] externals/ivy-hydra 1883499 217/395: ivy.el (ivy-auto-shrink-minibuffer-alist): Extend from ivy-auto-shrink-minibuffer
Date: Thu, 25 Feb 2021 08:32:06 -0500 (EST)

branch: externals/ivy-hydra
commit 188349971bc08640ae632fd109b1bf2b88306be6
Author: Oleh Krehel <ohwoeowho@gmail.com>
Commit: Oleh Krehel <ohwoeowho@gmail.com>

    ivy.el (ivy-auto-shrink-minibuffer-alist): Extend from 
ivy-auto-shrink-minibuffer
    
    Fixes #2516
---
 ivy.el | 18 ++++++++++++++----
 1 file changed, 14 insertions(+), 4 deletions(-)

diff --git a/ivy.el b/ivy.el
index 7417a4e..2258e30 100644
--- a/ivy.el
+++ b/ivy.el
@@ -3458,9 +3458,19 @@ Should be run via minibuffer `post-command-hook'."
         (when (region-active-p)
           (set-mark old-mark))))))
 
-(defcustom ivy-auto-shrink-minibuffer nil
-  "When non-nil and the height < `ivy-height', auto-shrink the minibuffer."
-  :type 'boolean)
+(defcustom ivy-auto-shrink-minibuffer-alist nil
+  "An alist to configure auto-shrinking of the minibuffer.
+
+Each key is a caller symbol. When the value is non-nil, and the
+height < `ivy-height', auto-shrink the minibuffer."
+  :type '(alist
+          :key-type symbol
+          :value-type boolean))
+
+(define-obsolete-variable-alias
+    'ivy-auto-shrink-minibuffer
+    'ivy-auto-shrink-minibuffer-alist
+  "<2020-04-28 Tue>")
 
 (defun ivy--resize-minibuffer-to-fit ()
   "Resize the minibuffer window size to fit the text in the minibuffer."
@@ -3479,7 +3489,7 @@ Should be run via minibuffer `post-command-hook'."
                    (let ((delta (max (- text-height body-height)
                                      (frame-char-height))))
                      (window-resize nil delta nil t t)))
-                  ((and ivy-auto-shrink-minibuffer
+                  ((and (ivy-alist-setting ivy-auto-shrink-minibuffer)
                         (< ivy--length ivy-height))
                    (shrink-window (-
                                    (/ (window-body-height nil t)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]