branch: elpa/git-commit commit 2df1e34665a2fb7872050a770a5cd608418fdc7f Author: Jonas Bernoulli <jo...@bernoul.li> Commit: Jonas Bernoulli <jo...@bernoul.li>
magit-section-child-count: New face Closes #4599. --- lisp/magit-section.el | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lisp/magit-section.el b/lisp/magit-section.el index 09b5a3c370..8842aeed3a 100644 --- a/lisp/magit-section.el +++ b/lisp/magit-section.el @@ -291,6 +291,10 @@ but that ship has sailed, thus this option." "Face for selected section headings." :group 'magit-section-faces) +(defface magit-section-child-count '((t nil)) + "Face used for child counts at the end of some section headings." + :group 'magit-section-faces) + ;;; Classes (defvar magit--current-section-hook nil @@ -1238,7 +1242,9 @@ evaluated its BODY. Admittedly that's a bit of a hack." (eq (char-before (1- content)) ?:)) (save-excursion (goto-char (- content 2)) - (insert (format " (%s)" count)) + (insert (concat (magit--propertize-face " " 'magit-section-heading) + (magit--propertize-face (format "(%s)" count) + 'magit-section-child-count))) (delete-char 1))))) ;;; Highlight