branch: elpa/git-commit commit 264e92436cc6b809a30ae035a5b2821bdcd71176 Author: Jonas Bernoulli <jo...@bernoul.li> Commit: Jonas Bernoulli <jo...@bernoul.li>
Use xor --- lisp/magit-section.el | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lisp/magit-section.el b/lisp/magit-section.el index 74d242c437..c939bf853b 100644 --- a/lisp/magit-section.el +++ b/lisp/magit-section.el @@ -1603,9 +1603,7 @@ evaluated its BODY. Admittedly that's a bit of a hack." (let ((section (magit-current-section))) (when (or force magit-section-highlight-force-update - (cond ; `xor' wasn't added until 27.1. - ((not magit-section-pre-command-region-p) (region-active-p)) - ((not (region-active-p)) magit-section-pre-command-region-p)) + (xor magit-section-pre-command-region-p (region-active-p)) (not (eq magit-section-pre-command-section section))) (let ((inhibit-read-only t) (deactivate-mark nil)