branch: elpa/magit
commit 4a60aa61e4fdc5e95380ea0c6950434f2354d966
Author: Jonas Bernoulli <[email protected]>
Commit: Jonas Bernoulli <[email protected]>
magit-diff.el: Split up "Hunk Paint" section
---
lisp/magit-diff.el | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/lisp/magit-diff.el b/lisp/magit-diff.el
index 021c5aee775..18cdce98941 100644
--- a/lisp/magit-diff.el
+++ b/lisp/magit-diff.el
@@ -3345,6 +3345,7 @@ actually a `diff' but a `diffstat' section."
(eq (region-end) (region-beginning))))))
;;; Hunk Paint
+;;;; Paint
(cl-defmethod magit-section-paint ((section magit-hunk-section) highlight)
(unless magit-diff-highlight-hunk-body
@@ -3392,6 +3393,8 @@ actually a `diff' but a `diffstat' section."
(magit-diff-update-hunk-refinement section))
(oset section painted (if highlight 'highlight 'plain)))
+;;;; Whitespace
+
(defvar magit-diff--tab-width-cache nil)
(defun magit-diff-tab-width (file)
@@ -3463,6 +3466,8 @@ actually a `diff' but a `diffstat' section."
(overlay-put ov 'priority 2)
(overlay-put ov 'evaporate t))))))
+;;;; Refinement
+
(cl-defmethod magit-section--refine ((section magit-hunk-section))
(when (eq magit-diff-refine-hunk t)
(magit-diff-update-hunk-refinement section)))