From aed3fd31fa79870b611f3cb61b8da07141ecd2e5 Mon Sep 17 00:00:00 2001 From: Jonas Bernoulli Date: Sun, 31 Aug 2025 01:36:42 +0200 Subject: magit--get-file-icon: Don't override the icon package's face We used to override `font-lock-face' but not `face'. That ended up working because we did not enable `font-lock-mode'. It would have broken if something else enabled `font-lock-mode'. Starting with [1: 7de0f1335f] we enable `font-lock-mode' ourselves, so since then we always discarded the face selected by the icon package. Closes #5435. 1: 2025-08-22 7de0f1335f8c4954d6d07413c5ec19fc8200078c magit-section-mode: Set font-lock-defaults to disable syntactic font-lock --- lisp/magit-diff.el | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/lisp/magit-diff.el b/lisp/magit-diff.el index 7c844ed..d614f21 100644 --- a/lisp/magit-diff.el +++ b/lisp/magit-diff.el @@ -2519,13 +2519,15 @@ function errors." (if (eq kind 'module) (lambda (_) t) (symbol-function dir-is-submodule)))) - (propertize (concat (and status (format "%-11s" status)) - (if orig - (format "%s %s -> %s %s" - (icon orig) orig - (icon file) file) - (format "%s %s" (icon file) file))) - 'font-lock-face face)))) + (if orig + (format (magit--propertize-face "%s%s %s -> %s %s" face) + (if status (format "%-11s" status) "") + (icon orig) orig + (icon file) file) + (format (magit--propertize-face "%s%s %s" face) + (if status (format "%-11s" status) "") + (icon file) + file))))) (defun magit-diff-wash-submodule () ;; See `show_submodule_summary' in submodule.c and "this" commit. -- cgit v1.0