Function: corfu--candidates-popup
corfu--candidates-popup is a byte-compiled function defined in
corfu.el.
Signature
(corfu--candidates-popup POS)
Documentation
Show candidates popup at POS.
Source Code
;; Defined in ~/.emacs.d/elpa/corfu-20260813.950/corfu.el
(defun corfu--candidates-popup (pos)
"Show candidates popup at POS."
(corfu--compute-scroll)
(pcase-let* ((last (min (+ corfu--scroll corfu-count) corfu--total))
(bar (ceiling (* corfu-count corfu-count) corfu--total))
(lo (min (- corfu-count bar 1) (floor (* corfu-count corfu--scroll) corfu--total)))
(`(,mf . ,acands)
(corfu--affixate
(cl-loop
repeat corfu-count for c in (nthcdr corfu--scroll corfu--candidates)
collect (funcall corfu--hilit
;; bug#77754: Highlight unquoted string.
(substring (or (get-text-property
0 'completion--unquoted c) c))))))
(`(,pw ,width ,fcands) (corfu--format-candidates acands))
;; Disable the left margin if a margin formatter is active.
(corfu-left-margin-width (if mf 0 corfu-left-margin-width)))
;; Nonlinearity at the end and the beginning
(when (/= corfu--scroll 0)
(setq lo (max 1 lo)))
(when (/= last corfu--total)
(setq lo (min (- corfu-count bar 2) lo)))
(corfu--popup-show pos pw width fcands (- corfu--index corfu--scroll)
(and (> corfu--total corfu-count) lo) bar)))