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

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

[elpa] externals/corfu cf7c6c9 05/14: Do not show annotation in candidat


From: Protesilaos Stavrou
Subject: [elpa] externals/corfu cf7c6c9 05/14: Do not show annotation in candidate preview (See #2)
Date: Sat, 17 Apr 2021 10:25:42 -0400 (EDT)

branch: externals/corfu
commit cf7c6c93220683bbdac9ae348349523da10fcd06
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>

    Do not show annotation in candidate preview (See #2)
---
 corfu.el | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/corfu.el b/corfu.el
index c667a32..f2db2ff 100644
--- a/corfu.el
+++ b/corfu.el
@@ -390,22 +390,20 @@
              (last (min (+ start corfu-count) corfu--total))
              (bar (ceiling (* corfu-count corfu-count) corfu--total))
              (lo (min (- corfu-count bar 1) (floor (* corfu-count start) 
corfu--total)))
-             (candidates (thread-last (seq-subseq corfu--candidates start last)
-                           (funcall corfu--highlight)
-                           (corfu--annotate metadata)
-                           (mapcar #'corfu--format-candidate))))
+             (cands (funcall corfu--highlight (seq-subseq corfu--candidates 
start last)))
+             (ann-cands (mapcar #'corfu--format-candidate (corfu--annotate 
metadata cands))))
         (when (>= curr 0)
           (let ((ov (make-overlay beg end nil t t)))
             (overlay-put ov 'priority 1000)
             (overlay-put ov 'window (selected-window))
-            (overlay-put ov 'display (nth curr candidates))
+            (overlay-put ov 'display (nth curr cands))
             (push ov corfu--overlays)))
         ;; Nonlinearity at the end and the beginning
         (when (/= start 0)
           (setq lo (max 1 lo)))
         (when (/= last corfu--total)
           (setq lo (min (- corfu-count bar 2) lo)))
-        (corfu--popup beg curr (and (> corfu--total corfu-count) lo) bar 
candidates)))))
+        (corfu--popup beg curr (and (> corfu--total corfu-count) lo) bar 
ann-cands)))))
 
 (defun corfu--post-command-hook ()
   "Refresh Corfu after last command."



reply via email to

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