Skip to content

Commit

Permalink
Try to prevent the resize of minibuffer window
Browse files Browse the repository at this point in the history
* 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 abo-abo#77
  • Loading branch information
abo-abo committed May 6, 2015
1 parent 386184b commit 4a7ba2f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ivy.el
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 4a7ba2f

Please sign in to comment.