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

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

[elpa] master 5c09439 75/90: Re-scale the text height to default in the


From: Oleh Krehel
Subject: [elpa] master 5c09439 75/90: Re-scale the text height to default in the minibuffer
Date: Tue, 30 Jun 2015 07:29:21 +0000

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

    Re-scale the text height to default in the minibuffer
    
    * 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 |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/ivy.el b/ivy.el
index 0665edf..fd0eae8 100644
--- 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)



reply via email to

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