Skip to content

Commit

Permalink
Revert last change to ivy-update-candidates
Browse files Browse the repository at this point in the history
This reverts commit 71c59ae
"ivy.el (ivy--format-minibuffer-line): Check for annotation-function
in one more place".

It seems to have broken downstream packages, so I'm reverting it for
now, until Oleh Krehel or some other more experienced person can
revisit it in earnest.

Re: #2783.
  • Loading branch information
basil-conto committed Jan 9, 2021
1 parent 71c59ae commit 764b978
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions ivy.el
Original file line number Diff line number Diff line change
Expand Up @@ -3284,14 +3284,10 @@ The function was added in Emacs 26.1.")
"~"
home)))))

(defvar ivy--minibuffer-metadata nil)

(defun ivy-update-candidates (cands)
(let ((ivy--minibuffer-metadata
(completion-metadata "" minibuffer-completion-table minibuffer-completion-predicate)))
(ivy--insert-minibuffer
(ivy--format
(setq ivy--all-candidates cands)))))
(ivy--insert-minibuffer
(ivy--format
(setq ivy--all-candidates cands))))

(defun ivy--exhibit ()
"Insert Ivy completions display.
Expand Down Expand Up @@ -4034,8 +4030,7 @@ in this case."
(funcall ivy--highlight-function str))
str))
(olen (length str))
(annot (or (completion-metadata-get ivy--minibuffer-metadata 'annotation-function)
(plist-get completion-extra-properties :annotation-function))))
(annot (plist-get completion-extra-properties :annotation-function)))
(add-text-properties
0 olen
'(mouse-face
Expand Down

0 comments on commit 764b978

Please sign in to comment.