diff options
| author | Jonas Bernoulli <jonas@bernoul.li> | 2024-10-01 21:16:16 +0200 |
|---|---|---|
| committer | Jonas Bernoulli <jonas@bernoul.li> | 2024-10-01 21:16:16 +0200 |
| commit | b0e6d02e6183c53663f170d64c19f17db7d04812 (patch) | |
| tree | 6f9b829214432cbb9a7285eb7e9c8c63b16cf826 | |
| parent | 5395798301dfbb6f295c511028f538d94ce7cad7 (diff) | |
magit-blame--update-heading-overlay: Reset all face properties
By using `default' as the last face, we prevent the `before-string'
from being displayed using any attributes from the faces use by the
first character of the text on which we put the overlay.
Closes #5223.
| -rw-r--r-- | CHANGELOG | 2 | ||||
| -rw-r--r-- | lisp/magit-blame.el | 5 |
2 files changed, 6 insertions, 1 deletions
@@ -25,6 +25,8 @@ Bug fixes: - ~magit-blame--format-string-1~ didn't handle a list of faces correctly. +- Addressed an incompatibility with Indent-Bars. #5233 + * v4.1.0 2024-09-01 - The library ~git-commit.el~ is no longer distributed as a separate diff --git a/lisp/magit-blame.el b/lisp/magit-blame.el index 5601973..7acddad 100644 --- a/lisp/magit-blame.el +++ b/lisp/magit-blame.el @@ -644,7 +644,10 @@ modes is toggled, then this mode also gets toggled automatically. (overlay-put ov 'before-string (if-let ((format (magit-blame--style-get 'heading-format))) - (magit-blame--format-string ov format 'magit-blame-heading) + ;; Use `default' as the last face to avoid picking up any face + ;; attributes from the first character of the text on which we + ;; put the overlay. See #5233. + (magit-blame--format-string ov format '(magit-blame-heading default)) (and (magit-blame--style-get 'show-lines) (or (not (magit-blame--style-get 'margin-format)) (save-excursion |
