-
Notifications
You must be signed in to change notification settings - Fork 8
Description
Problem
After updating Magit package in Doom Emacs, syntax highlighting and fonts stopped rendering correctly in PR diffs.
works with: https://github.com/magit/magit/commits/v4.3.8/
breaks at: https://github.com/magit/magit/commits/v4.4.0/
Root Cause
From the Magit v4.4.0 changelog:
"All text inserted into Magit buffers that previously used
facenow usefont-lock-faceand magit-section-mode can therefore set font-lock-defaults. Previously if some third-party packages used font-lock-add-keywords, some of Magit's own fontification would be lost. Third-party packages that use magit-section-mode, might need to be adjusted accordingly."
The Breaking Change:
- Magit switched from using the
facetext property tofont-lock-face - pr-review was only looking for overlays with the
faceproperty - pr-review buffers weren't activating
font-lock-modeto renderfont-lock-face
The pr-review package transfers overlays to text properties (since overlays don't survive buffer copying), but the old detection logic only looked for overlays with the specific 'diff-mode property.