branch: elpa/magit
commit 87fe8085287f4ff4706bf191e9bc522df5e61079
Author: Jonas Bernoulli <[email protected]>
Commit: Jonas Bernoulli <[email protected]>
magit-diff-{our,base,their}-heading: New faces
---
lisp/magit-diff.el | 44 +++++++++++++++++++++++++++++++++++++++++---
1 file changed, 41 insertions(+), 3 deletions(-)
diff --git a/lisp/magit-diff.el b/lisp/magit-diff.el
index c425315649..344fe25ce7 100644
--- a/lisp/magit-diff.el
+++ b/lisp/magit-diff.el
@@ -681,6 +681,42 @@ side. That way you don't lose the ability to visit the
old side."
"Face for diff hunk heading when lines are marked."
:group 'magit-faces)
+(defface magit-diff-our-heading
+ `((((class color) (background light))
+ :extend t
+ :background "#aa2222"
+ :foreground "#ffdddd")
+ (((class color) (background dark))
+ :extend t
+ :background "#ffdddd"
+ :foreground "#553333"))
+ "Face for headings of our side in merge conflicts."
+ :group 'magit-faces)
+
+(defface magit-diff-base-heading
+ `((((class color) (background light))
+ :extend t
+ :background "#aaaa11"
+ :foreground "#ffffcc")
+ (((class color) (background dark))
+ :extend t
+ :background "#ffffcc"
+ :foreground "#555522"))
+ "Face for headings of common base in merge conflicts."
+ :group 'magit-faces)
+
+(defface magit-diff-their-heading
+ `((((class color) (background light))
+ :extend t
+ :background "#22aa22"
+ :foreground "#ddffdd")
+ (((class color) (background dark))
+ :extend t
+ :background "#ddffdd"
+ :foreground "#335533"))
+ "Face for headings of their side in merge conflicts."
+ :group 'magit-faces)
+
;;;; Lines
(defface magit-diff-context
@@ -3472,9 +3508,11 @@ actually a `diff' but a `diffstat' section."
(cond
((looking-at "^\\+\\+?\\([<=|>]\\)\\{7\\}")
(setq line-face
- (if highlight
- 'magit-diff-conflict-heading-highlight
- 'magit-diff-conflict-heading))
+ (pcase (match-str 1)
+ ("<" 'magit-diff-our-heading)
+ ("|" 'magit-diff-base-heading)
+ ("=" 'magit-diff-their-heading)
+ (">" 'magit-diff-their-heading)))
(setq sign-face-side
(pcase (match-str 1)
("<" 'magit-diff-our-indicator)