branch: elpa/magit commit 3f79700f1b9a6f5f6fd6a77fd1e812c1b8e6463b Author: Jonas Bernoulli <jo...@bernoul.li> Commit: Jonas Bernoulli <jo...@bernoul.li>
magit-insert-section--finish: Always add heading keymap Previously we only did so if the section had children. That was wrong because the section may have a body that doesn't belong to children, or it may have a `washer', which adds a body when the section is expanded. Instead of merely also adding the heading keymap in those cases as well, add it always. Currently that keymap by default only features commands to expand/collapse the section, but it is valid for someone to add more commands. Some users/packages might already be doing that and we might start to do so by default. --- lisp/magit-section.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/magit-section.el b/lisp/magit-section.el index 930209b2b7..5ddd990a2e 100644 --- a/lisp/magit-section.el +++ b/lisp/magit-section.el @@ -1463,8 +1463,8 @@ anything this time around. (magit-section-show obj))) (t (magit-section--set-section-properties obj) + (magit-section-maybe-add-heading-map obj) (when (oref obj children) - (magit-section-maybe-add-heading-map obj) (magit-insert-child-count obj)) (if magit-section-insert-in-reverse (push obj (oref (oref obj parent) children))