Function: treemacs--collapse-root-node

treemacs--collapse-root-node is a byte-compiled function defined in treemacs-rendering.el.

Signature

(treemacs--collapse-root-node BTN &optional RECURSIVE)

Documentation

Collapse the given root BTN.

Remove all open entries below BTN when RECURSIVE is non-nil.

Source Code

;; Defined in ~/.emacs.d/elpa/treemacs-20251226.1307/treemacs-rendering.el
(defun treemacs--collapse-root-node (btn &optional recursive)
  "Collapse the given root BTN.
Remove all open entries below BTN when RECURSIVE is non-nil."
  (treemacs--button-close
   :button btn
   :new-state 'root-node-closed
   :new-icon treemacs-icon-root-closed
   :post-close-action
   (-let [path (treemacs-button-get btn :path)]
     (treemacs--stop-watching path)
     (treemacs-on-collapse path recursive))))