Function: vertico--format-group-title

vertico--format-group-title is a natively compiled function defined in vertico.el.

Signature

(vertico--format-group-title TITLE CAND)

Documentation

Format group TITLE given the current CAND.

Source Code

;; Defined in /nix/store/h1nc2k1rxmi6k9cfflcd37cf4zfhp2v5-emacs-packages-deps/share/emacs/site-lisp/elpa/vertico-20260913.1525/vertico.el
(defun vertico--format-group-title (title cand)
  "Format group TITLE given the current CAND."
  ;; Copy candidate highlighting if title is a prefix of the candidate.
  (when (string-prefix-p title cand)
    (setq title (substring cand 0 (length title)))
    (vertico--remove-face 0 (length title) 'completions-first-difference title))
  (setq title (substring title))
  (add-face-text-property 0 (length title) 'vertico-group-title t title)
  (format (concat vertico-group-format "\n") title))