Function: magit-diff-highlight-hunk-region-dim-outside
magit-diff-highlight-hunk-region-dim-outside is a byte-compiled
function defined in magit-diff.el.
Signature
(magit-diff-highlight-hunk-region-dim-outside SECTION)
Documentation
Dim the parts of the hunk that are outside the hunk-internal region.
This is done by using the same foreground and background color for added and removed lines as for context lines.
Source Code
;; Defined in ~/.emacs.d/elpa/magit-20260411.1452/magit-diff.el
(defun magit-diff-highlight-hunk-region-dim-outside (section)
"Dim the parts of the hunk that are outside the hunk-internal region.
This is done by using the same foreground and background color
for added and removed lines as for context lines."
(let ((face (if magit-diff-highlight-hunk-body
'magit-diff-context-highlight
'magit-diff-context)))
(when magit-diff-unmarked-lines-keep-foreground
(setq face `(:extend t :background ,(face-attribute face :background))))
(magit-diff--make-hunk-overlay (oref section content)
(magit-diff-hunk-region-beginning)
'font-lock-face face
'priority 2)
(magit-diff--make-hunk-overlay (1+ (magit-diff-hunk-region-end))
(oref section end)
'font-lock-face face
'priority 2)))