diff options
| author | Jonas Bernoulli <jonas@bernoul.li> | 2025-05-08 10:17:55 +0200 |
|---|---|---|
| committer | Jonas Bernoulli <jonas@bernoul.li> | 2025-05-08 10:17:55 +0200 |
| commit | bafac417b5a9c3dd3f9e9af5fa3c16f75b4afe1d (patch) | |
| tree | 3cfea9e3014ae1f0c8e0d3f68d6f82bd7e4d56b9 /lisp/magit-git.el | |
| parent | 48b158500dcdfe51ac6ff0dfa9066a368a322069 (diff) | |
magit--insert-related-refs: Use a single section
Use one section per category, instead of one section per ref on the
line. This is the only place where we violated the rule that there
is only ever one section per line.
I always found it annoying that moving over these headers took more
key presses than expected when using `magit-next-section', and I
never developed an intuition for not using that command here, because
it so convincingly looks like using that is efficient enough.
An upcoming refactoring to section highlighting would break for these
sections, so let's address it now.
It is also simply unnecessary to use a section per branch. Nowadays
commands that act on the branch at point, need no section, a painted
ref will do. A small tweak to `magit-branch-at-point' will do.
Diffstat (limited to 'lisp/magit-git.el')
| -rw-r--r-- | lisp/magit-git.el | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lisp/magit-git.el b/lisp/magit-git.el index abd8f2b..2e6a14c 100644 --- a/lisp/magit-git.el +++ b/lisp/magit-git.el @@ -1527,6 +1527,7 @@ to, or to some other symbolic-ref that points to the same ref." (pullreq (and (fboundp 'forge--pullreq-branch) (magit-branch-p (forge--pullreq-branch (oref it value))))) + (related-refs (magit--painted-branch-at-point)) ((unpulled unpushed) (magit-ref-abbrev (replace-regexp-in-string "\\.\\.\\.?" "" (oref it value)))))) |
