]> code.delx.au - gnu-emacs-elpa/commitdiff
Re-scale the text height to default in the minibuffer
authorOleh Krehel <ohwoeowho@gmail.com>
Tue, 23 Jun 2015 10:41:17 +0000 (12:41 +0200)
committerOleh Krehel <ohwoeowho@gmail.com>
Tue, 23 Jun 2015 10:41:17 +0000 (12:41 +0200)
* ivy.el (ivy--format): Set the string height to default and turn off
  overline, so that exactly `ivy-height' lines are visible, not less.

Fixes #151

ivy.el

diff --git a/ivy.el b/ivy.el
index 0665edfcefd4ee5ae715d146e23572253c56f184..fd0eae8c0029a43354cb3ebafbbd7733d1b8a839 100644 (file)
--- a/ivy.el
+++ b/ivy.el
@@ -1321,6 +1321,15 @@ CANDS is a list of strings."
       (setq ivy--current (copy-sequence (nth index cands)))
       (setf (nth index cands)
             (ivy--add-face ivy--current 'ivy-current-match))
+      (setq cands (mapcar
+                   (lambda (s)
+                     (let ((s (copy-sequence s)))
+                       (add-face-text-property
+                        0 (length s)
+                        `(:height ,(face-attribute 'default :height)
+                                  :overline nil) nil s)
+                       s))
+                   cands))
       (let* ((ivy--index index)
              (res (concat "\n" (funcall ivy-format-function cands))))
         (put-text-property 0 (length res) 'read-only nil res)