aboutsummaryrefslogtreecommitdiff
path: root/lisp/magit-base.el
diff options
context:
space:
mode:
authorJonas Bernoulli <jonas@bernoul.li>2026-04-11 16:52:58 +0200
committerJonas Bernoulli <jonas@bernoul.li>2026-04-11 16:52:58 +0200
commit68cfa77319b6935773b4882f92e092024eb8b8f8 (patch)
tree8e65f8398ab95674a4618936f9e7ba8a76ee9f56 /lisp/magit-base.el
parentb400caeb52fe67419d29713a0f16c8118a56f303 (diff)
Do not attempt to fontify and refine metadata hunks
The new `magit--meta-hunk-p' is a kludge, instead we should define proper types for these "not-quite-a-hunk" sections. Closes #5554.
Diffstat (limited to 'lisp/magit-base.el')
-rw-r--r--lisp/magit-base.el3
1 files changed, 3 insertions, 0 deletions
diff --git a/lisp/magit-base.el b/lisp/magit-base.el
index cdb8e20..53916cf 100644
--- a/lisp/magit-base.el
+++ b/lisp/magit-base.el
@@ -504,6 +504,9 @@ and delay of your graphical environment or operating system."
(heading-highlight-face :initform 'magit-diff-hunk-heading-highlight)
(heading-selection-face :initform 'magit-diff-hunk-heading-selection)))
+(defun magit--meta-hunk-p (section)
+ (not (cdr (oref section value))))
+
(setf (alist-get 'file magit--section-type-alist) 'magit-file-section)
(setf (alist-get 'module magit--section-type-alist) 'magit-module-section)
(setf (alist-get 'hunk magit--section-type-alist) 'magit-hunk-section)