Update: 2.1.0
has been released.
In 1.4.*
/master
the face is named magit-item-highlight
. In 2.1.*
/next
it is named magit-section-highlight
, because that's what these ui elements are called everywhere else too.
When using 1.4.*
diffstats lose their appearance when they are highlighted because a face is used which overrides not only the background color but also the foreground color. The reason that doesn't happen for certain other sections is that we explicitly hack around the issue by using overlays for things that should be unaffected by the highlighting.
To fix that you could change the option magit-item-highlight-face
to another face which does not set the foreground color. Or you could make magit-item-highlight
inherit from another face which does not set the foreground. You cannot just set magit-item-highlight
s foreground to "none", because there is no such value - that's a limitation in Emacs.
The reason there are many issue related to the section highlighting is that there are diverging opinions one "how it should be" and "this is the worst possible thing you could do". It took a while implementing something that allows everyone to configuring it the way they want. And that will be released as 2.1.0
.
You should either update to the next
branch now, or just live with diffstats losing their foreground colors when highlighted - that seems like a very minor issue.
magit
and didn't see that particular face -- so perhaps the maintainer changed it already (in which case, you may wish to consider upgradingmagit
).(defface magit-item-highlight . . .
If you are uncomfortable modifying source, you may wish to consider using(set-face-attribute . . .
. If those files are byte-compiled and you choose to modify the source code directly, then you will need to re-byte-compile them. There are some Github issues previously posted regarding that face, so the maintainer may have already fixed it . . . .