Function: treemacs--prev-non-child-button
treemacs--prev-non-child-button is a byte-compiled function defined in
treemacs-core-utils.el.
Signature
(treemacs--prev-non-child-button BTN)
Documentation
Get the previous same-level neighbour of BTN, if any.
Source Code
;; Defined in ~/.emacs.d/elpa/treemacs-20251226.1307/treemacs-core-utils.el
(define-inline treemacs--prev-non-child-button (btn)
"Get the previous same-level neighbour of BTN, if any."
(declare (side-effect-free t))
(inline-letevals (btn)
(inline-quote
(let ((depth (treemacs-button-get ,btn :depth))
(prev (previous-button (treemacs-button-start ,btn))))
(while (and prev (< depth (treemacs-button-get prev :depth)))
(setq prev (previous-button (treemacs-button-start prev))))
(when (and prev (= depth (treemacs-button-get prev :depth))) prev)))))