]> code.delx.au - gnu-emacs-elpa/commitdiff
ivy.el (ivy--resize-minibuffer-to-fit): Make compatible with 24.3
authorOleh Krehel <ohwoeowho@gmail.com>
Sat, 26 Sep 2015 11:28:23 +0000 (13:28 +0200)
committerOleh Krehel <ohwoeowho@gmail.com>
Sat, 26 Sep 2015 11:28:23 +0000 (13:28 +0200)
Fixes #220

ivy.el

diff --git a/ivy.el b/ivy.el
index 1949392548721523e682f036a720f3f5aadec33f..c5aeb9b57d1d147113ee05b9b571636deb62dd75 100644 (file)
--- a/ivy.el
+++ b/ivy.el
@@ -1410,7 +1410,10 @@ all of the text contained in the minibuffer."
               (body-height (window-body-height nil t)))
           (when (> text-height body-height)
             (window-resize nil (- text-height body-height) nil t t)))
-      (fit-window-to-buffer))))
+        (let ((text-height (count-screen-lines))
+              (body-height (window-body-height)))
+          (when (> text-height body-height)
+            (window-resize nil (- text-height body-height) nil t))))))
 
 (declare-function colir-blend-face-background "ext:colir")