emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/git-commit 58221f7be8 6/7: magit-maybe-make-margin-overlay


From: ELPA Syncer
Subject: [nongnu] elpa/git-commit 58221f7be8 6/7: magit-maybe-make-margin-overlay: Use magit-section-match properly
Date: Sat, 28 Oct 2023 07:01:00 -0400 (EDT)

branch: elpa/git-commit
commit 58221f7be8abe6f8076693973165e4b0f5f94ab5
Author: Jonas Bernoulli <jonas@bernoul.li>
Commit: Jonas Bernoulli <jonas@bernoul.li>

    magit-maybe-make-margin-overlay: Use magit-section-match properly
    
    By making full use of `magit-section-match's functionality, we can
    drop the special case for the refs buffer.
    
    Don't match [commit * branchbuf].  Those sections don't have any
    body.
---
 lisp/magit-margin.el | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/lisp/magit-margin.el b/lisp/magit-margin.el
index 14d178ea0d..e537a5a147 100644
--- a/lisp/magit-margin.el
+++ b/lisp/magit-margin.el
@@ -166,15 +166,13 @@ does not carry to other options."
                                      (or string " ")))))))
 
 (defvar magit-margin-overlay-conditions
-  '(unpulled unpushed recent stashes local cherries))
+  '( unpulled unpushed recent stashes local cherries
+     [remote branchbuf]
+     [tags branchbuf]))
 
 (defun magit-maybe-make-margin-overlay ()
-  (when (or (magit-section-match magit-margin-overlay-conditions
-                                 magit-insert-section--current)
-            (and (eq major-mode 'magit-refs-mode)
-                 (magit-section-match
-                  '(remote commit tags)
-                  magit-insert-section--current)))
+  (when (magit-section-match magit-margin-overlay-conditions
+                             magit-insert-section--current)
     (magit-make-margin-overlay nil t)))
 
 ;;; Custom Support



reply via email to

[Prev in Thread] Current Thread [Next in Thread]