branch: master
commit 59908cde3443eee44d5e29cba233ee6461fffd1a
Author: Oleh Krehel <[email protected]>
Commit: Oleh Krehel <[email protected]>
Make ivy-current blend correctly for fancy minibuffer
* ivy.el (ivy--format-minibuffer-line): Stop setting :height - it messes
with blending. Also, the minibuffer height issue was fixed in an
earlier pull request.
(ivy--format): Call `ivy--add-face' on modified string, not on the
original one.
---
ivy.el | 9 ++-------
1 files changed, 2 insertions(+), 7 deletions(-)
diff --git a/ivy.el b/ivy.el
index cba70b0..c620007 100644
--- a/ivy.el
+++ b/ivy.el
@@ -1531,11 +1531,6 @@ This string will be inserted into the minibuffer.")
nil
str))
(cl-incf i)))))
- (when (fboundp 'add-face-text-property)
- (add-face-text-property
- 0 (length str)
- `(:height ,(face-attribute 'default :height)
- :overline nil) nil str))
str))
(defun ivy--format (cands)
@@ -1559,11 +1554,11 @@ CANDS is a list of strings."
x))
cands)))
(setq ivy--current (copy-sequence (nth index cands)))
- (setf (nth index cands)
- (ivy--add-face ivy--current 'ivy-current-match))
(setq cands (mapcar
#'ivy--format-minibuffer-line
cands))
+ (setf (nth index cands)
+ (ivy--add-face (nth index cands) 'ivy-current-match))
(let* ((ivy--index index)
(res (concat "\n" (funcall ivy-format-function cands))))
(put-text-property 0 (length res) 'read-only nil res)