]> code.delx.au - gnu-emacs-elpa/commitdiff
Fix minibuffer collapse in text mode emacs
authorJulien Wietrich <julien.w6h@gmail.com>
Tue, 22 Sep 2015 17:02:39 +0000 (19:02 +0200)
committerJulien Wietrich <julien.w6h@gmail.com>
Tue, 22 Sep 2015 17:02:39 +0000 (19:02 +0200)
In graphic mode : resize-mini-windows is temporarily set to nil, the
only value which does not collapse the minibuffer.

In text mode : if resize-mini-windows is nil, it is temporarily set to
'grow-only (default emacs value).

This prevent the minibuffer collapse in both graphic and text mode.

In text mode it respects the user settings if it is already set to
'grow-only or t.

Fix #237 in text mode emacs too.

ivy.el

diff --git a/ivy.el b/ivy.el
index 13ecd196deb270ab9f2007f61b94e4d214b473b0..1949392548721523e682f036a720f3f5aadec33f 100644 (file)
--- a/ivy.el
+++ b/ivy.el
@@ -890,7 +890,10 @@ candidates with each input."
              (let* ((hist (or history 'ivy-history))
                     (minibuffer-completion-table collection)
                     (minibuffer-completion-predicate predicate)
-                    (resize-mini-windows nil)
+                    (resize-mini-windows (cond
+                                          ((display-graphic-p) nil)
+                                          ((null resize-mini-windows) 'grow-only)
+                                          (t resize-mini-windows)))
                     (res (read-from-minibuffer
                           prompt
                           (ivy-state-initial-input ivy-last)