branch: elpa/magit commit 9395de2c94cc430ca865f497046c16f66deccf16 Author: Jonas Bernoulli <jo...@bernoul.li> Commit: Jonas Bernoulli <jo...@bernoul.li>
magit-section-maybe-remove-heading-map: Fix preserving section map --- lisp/magit-section.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/magit-section.el b/lisp/magit-section.el index cdde1c833e6..eed4e21b504 100644 --- a/lisp/magit-section.el +++ b/lisp/magit-section.el @@ -1633,7 +1633,8 @@ is explicitly expanded." (defun magit-section-maybe-remove-heading-map (section) (with-slots (start content end keymap) section (when (= content end) - (put-text-property start end 'keymap keymap)))) + (put-text-property start end 'keymap + (if (symbolp keymap) (symbol-value keymap) keymap))))) (defun magit-insert-child-count (section) "Modify SECTION's heading to contain number of child sections.