branch: elpa/magit
commit ced3d5afc33d06305f04dd1557bf2fe849914511
Author: Jonas Bernoulli <[email protected]>
Commit: Jonas Bernoulli <[email protected]>

    git-commit-propertize-diff: Skip refinements that won't survive
    
    Closes #5483.
---
 lisp/git-commit.el | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/lisp/git-commit.el b/lisp/git-commit.el
index ab4d9cc926b..915f4229517 100644
--- a/lisp/git-commit.el
+++ b/lisp/git-commit.el
@@ -1169,6 +1169,11 @@ Added to `font-lock-extend-region-functions'."
                 (delete-region (point) (point-max)))))
            (let ((diff-default-read-only nil))
              (diff-mode))
+           ;; These won't survive copying to another buffer,
+           ;; so let's not waste any time.  See #5483.
+           (setq-local diff-refine nil)
+           (setq-local diff-font-lock-syntax nil)
+           (setq-local diff-font-lock-prettify nil)
            (let ((font-lock-verbose nil)
                  (font-lock-support-mode nil))
              (font-lock-ensure))

Reply via email to