branch: elpa/magit
commit 312c544ffc87e56e4e62a6341c80d6106db16d09
Author: Jonas Bernoulli <jo...@bernoul.li>
Commit: Jonas Bernoulli <jo...@bernoul.li>

    magit-section-cycle: On root section use global cycling
    
    I recommend using `magit-section-cycle-global' instead, but if one
    happened to invoke the local variant at the end of the buffer (or
    after the headers in the status buffer), then it was annoying that
    this succeeded in expanding all sections, but then failed to hide
    again on subsequent invocations with "Cannot hide root section".
---
 lisp/magit-section.el | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lisp/magit-section.el b/lisp/magit-section.el
index a0e1809d3a..692b93aed2 100644
--- a/lisp/magit-section.el
+++ b/lisp/magit-section.el
@@ -1027,6 +1027,8 @@ global map, this involves advising 
`tab-bar--define-keys'."
          (eq (global-key-binding [C-tab]) 'tab-next)
          (fboundp 'tab-bar-switch-to-next-tab))
     (tab-bar-switch-to-next-tab current-prefix-arg))
+   ((eq section magit-root-section)
+    (magit-section-cycle-global))
    ((oref section hidden)
     (magit-section-show section)
     (magit-section-hide-children section))

Reply via email to