]> code.delx.au - gnu-emacs-elpa/commitdiff
Try to prevent the resize of minibuffer window
authorOleh Krehel <ohwoeowho@gmail.com>
Wed, 6 May 2015 19:01:14 +0000 (21:01 +0200)
committerOleh Krehel <ohwoeowho@gmail.com>
Wed, 6 May 2015 19:01:14 +0000 (21:01 +0200)
* ivy.el (ivy--insert-minibuffer): Temporarily bind
  `resize-mini-windows' to nil.

From its doc:
    A value of `grow-only', the default, means let mini-windows grow only;
    they return to their normal size when the minibuffer is closed, or the
    echo area becomes empty.

It could be that an update catches this minibuffer empty during
`ivy--insert-minibuffer'.

Re #77

ivy.el

diff --git a/ivy.el b/ivy.el
index eed6acb6a5de62a6b6698f8b6e49676b27e98b5d..9adeae0be3fe6b6548e3d0daaf2edef6f0353de2 100644 (file)
--- a/ivy.el
+++ b/ivy.el
@@ -934,10 +934,11 @@ Should be run via minibuffer `post-command-hook'."
 
 (defun ivy--insert-minibuffer (text)
   "Insert TEXT into minibuffer with appropriate cleanup."
-  (ivy--cleanup)
-  (let ((buffer-undo-list t)
+  (let ((resize-mini-windows nil)
+        (buffer-undo-list t)
         (update-fn (ivy-state-update-fn ivy-last))
         deactivate-mark)
+    (ivy--cleanup)
     (when update-fn
       (funcall update-fn))
     (ivy--insert-prompt)