Function: magit-refs--format-focus-column

magit-refs--format-focus-column is a byte-compiled function defined in magit-refs.el.

Signature

(magit-refs--format-focus-column REF &optional TYPE)

Source Code

;; Defined in ~/.emacs.d/elpa/magit-20260411.1452/magit-refs.el
(defun magit-refs--format-focus-column (ref &optional type)
  (let ((focus magit-buffer-refs-upstream)
        (width (if magit-refs-show-commit-count
                   magit-refs-focus-column-width
                 1)))
    (format
     (format "%%%ss " width)
     (cond ((or (equal ref focus)
                (and (eq type t)
                     (equal focus "HEAD")))
            (magit--propertize-face (concat (if (equal focus "HEAD") "@" "*")
                                            (make-string (1- width) ?\s))
                                    'magit-section-heading))
           ((if (eq type 'tag)
                (eq magit-refs-show-commit-count 'all)
              magit-refs-show-commit-count)
            (pcase-let ((`(,behind ,ahead)
                         (magit-rev-diff-count magit-buffer-refs-upstream ref)))
              (magit--propertize-face
               (cond ((> ahead  0) (concat "<" (number-to-string ahead)))
                     ((> behind 0) (concat (number-to-string behind) ">"))
                     ("="))
               'magit-dimmed)))
           ("")))))