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

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

[elpa] master d5ae6a3 30/54: ivy.el (ivy--resize-minibuffer-to-fit): Mak


From: Oleh Krehel
Subject: [elpa] master d5ae6a3 30/54: ivy.el (ivy--resize-minibuffer-to-fit): Make compatible with 24.3
Date: Tue, 29 Sep 2015 14:09:57 +0000

branch: master
commit d5ae6a3065a0df488a7cc4d5c6420ac0a1e92dcd
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>

    ivy.el (ivy--resize-minibuffer-to-fit): Make compatible with 24.3
    
    Re #220
---
 ivy.el |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/ivy.el b/ivy.el
index 2b36d2a..8e5405b 100644
--- a/ivy.el
+++ b/ivy.el
@@ -1398,10 +1398,12 @@ Should be run via minibuffer `post-command-hook'."
   "Resize the minibuffer window so it has enough space to display
 all of the text contained in the minibuffer."
   (with-selected-window (minibuffer-window)
-    (let ((text-height (cdr (window-text-pixel-size)))
-          (body-height (window-body-height nil t)))
-      (when (> text-height body-height)
-        (window-resize nil (- text-height body-height) nil t t)))))
+    (if (fboundp 'window-text-pixel-size)
+        (let ((text-height (cdr (window-text-pixel-size)))
+              (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))))
 
 (declare-function colir-blend-face-background "ext:colir")
 



reply via email to

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