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