branch: elpa/magit
commit fd1882b8c981c5e859522bde1dd9c88af9485709
Author: Jonas Bernoulli <jo...@bernoul.li>
Commit: Jonas Bernoulli <jo...@bernoul.li>

    Use higher overlay priority for selection highlighting overlays
    
    Since v4.3.7 the overlays used for section highlighting and section
    selection conflicted, if both of these faces relied on the same face
    property (likely the foreground color).  The usual way to theme these
    faces is to use the background for highlighting and the foreground for
    the selection.
    
    Closes #5389.
---
 CHANGELOG             | 7 +++++++
 lisp/magit-section.el | 1 +
 2 files changed, 8 insertions(+)

diff --git a/CHANGELOG b/CHANGELOG
index ba80911403..0076ee5e3f 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,4 +1,11 @@
 # -*- mode: org -*-
+* v4.3.7    UNRELEASED
+
+- Fixed a regression in v4.3.6, which caused a conflict between the
+  overlays used for section highlighting and section selection, if
+  both of these faces relied on the same face property (likely the
+  foreground color).  #5389
+
 * v4.3.6    2025-06-01
 
 - Generalized and heavily refactored the code, previously used only to
diff --git a/lisp/magit-section.el b/lisp/magit-section.el
index 847ec7e9ec..3f1e387d3d 100644
--- a/lisp/magit-section.el
+++ b/lisp/magit-section.el
@@ -1788,6 +1788,7 @@ evaluated its BODY.  Admittedly that's a bit of a hack."
                        (or heading-selection-face
                            'magit-section-heading-selection))
           (overlay-put ov 'evaporate t)
+          (overlay-put ov 'priority '(nil . 9))
           (push ov magit-section-selection-overlays)
           ov)))))
 

Reply via email to