branch: master
commit 3d600b6450a241a1bf8c60344c5cd85bf8ec2744
Author: travisf <[email protected]>
Commit: Oleh Krehel <[email protected]>

    Correct ivy-fixed-height-minibuffer size
    
    Correct the minibuffer height when ivy-fixed-height-minibuffer and
    ivy-add-newline-after prompt are both t.
    
    Fixes #737
---
 ivy.el | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/ivy.el b/ivy.el
index dbeb55f..23ce80b 100644
--- a/ivy.el
+++ b/ivy.el
@@ -2032,13 +2032,13 @@ depending on the number of candidates."
   (set (make-local-variable 'inhibit-field-text-motion) nil)
   (when (display-graphic-p)
     (setq truncate-lines t))
-  (setq-local max-mini-window-height
-              (+ ivy-height
-                 (if ivy-add-newline-after-prompt
-                     1
-                   0)))
+  (setq-local max-mini-window-height ivy-height)
   (when ivy-fixed-height-minibuffer
-    (set-window-text-height (selected-window) ivy-height))
+    (set-window-text-height (selected-window)
+                            (+ ivy-height
+                               (if ivy-add-newline-after-prompt
+                                   1
+                                 0))))
   (add-hook 'post-command-hook #'ivy--exhibit nil t)
   ;; show completions with empty input
   (ivy--exhibit))

Reply via email to