Function: magit-section-toggle

magit-section-toggle is an interactive and byte-compiled function defined in magit-section.el.

Signature

(magit-section-toggle SECTION)

Documentation

Toggle visibility of the body of the current section.

Key Bindings

Source Code

;; Defined in ~/.emacs.d/elpa/magit-section-20260330.1102/magit-section.el
(defun magit-section-toggle (section)
  "Toggle visibility of the body of the current section."
  (interactive (list (magit-current-section)))
  (cond ((eq section magit-root-section)
         (user-error "Cannot hide root section"))
        ((oref section hidden)
         (magit-section-show section))
        ((magit-section-hide section))))