branch: master
commit 5c0943966d56164d39abef22a487b020bbb45894
Author: Oleh Krehel <[email protected]>
Commit: Oleh Krehel <[email protected]>
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)