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

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

[nongnu] elpa/git-commit 2df1e34665: magit-section-child-count: New face


From: ELPA Syncer
Subject: [nongnu] elpa/git-commit 2df1e34665: magit-section-child-count: New face
Date: Tue, 15 Feb 2022 13:58:26 -0500 (EST)

branch: elpa/git-commit
commit 2df1e34665a2fb7872050a770a5cd608418fdc7f
Author: Jonas Bernoulli <jonas@bernoul.li>
Commit: Jonas Bernoulli <jonas@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



reply via email to

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