[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
- [nongnu] elpa/git-commit updated (16ddcd7cc8 -> 598219a338), ELPA Syncer, 2023/10/28
- [nongnu] elpa/git-commit af2fdd67b0 4/7: git-commit: Avoid rx, ELPA Syncer, 2023/10/28
- [nongnu] elpa/git-commit 72fbb3a579 3/7: magit-stash-read-message: Provide a default instead of magic, ELPA Syncer, 2023/10/28
- [nongnu] elpa/git-commit 58221f7be8 6/7: magit-maybe-make-margin-overlay: Use magit-section-match properly,
ELPA Syncer <=
- [nongnu] elpa/git-commit 598219a338 7/7: magit-margin-overlay-conditions: Add certain Forge sections, ELPA Syncer, 2023/10/28
- [nongnu] elpa/git-commit 7f33df3553 1/7: magit-convert-filename-for-git: Docstring cosmetics, ELPA Syncer, 2023/10/28
- [nongnu] elpa/git-commit 061c59a01e 2/7: magit-stash-read-untracked: Move definition, ELPA Syncer, 2023/10/28
- [nongnu] elpa/git-commit 6fcf60f25a 5/7: magit-margin-overlay-conditions: New variable, ELPA Syncer, 2023/10/28