Function: combobulate-display-make-tree

combobulate-display-make-tree is a natively compiled function defined in combobulate-display.el.

Signature

(combobulate-display-make-tree &optional START-NODE DEPTH)

Documentation

Build a sparse tree around the parent of the navigable node at point

Source Code

;; Defined in /nix/store/b5fvrwzi3zvkabyzx0in6gw1cj963z46-emacs-packages-deps/share/emacs/site-lisp/combobulate-display.el
;;; Sparse tree code -- used for performance reasons instead of
;;; `combobulate-nav-xxxx'.

(defun combobulate-display-make-tree (&optional start-node depth)
  "Build a sparse tree around the parent of the navigable node at point"
  (when-let ((node (or start-node (thread-first (combobulate--get-nearest-navigable-node)
                                                (combobulate-node-parent)
                                                (combobulate-node-parent)
                                                (combobulate-node-parent)))))
    (let ((tree (combobulate-induce-sparse-tree
                 node #'combobulate-navigable-node-p nil (or depth 3))))
      ;; the tree may start with a `nil' node; if so, ditch it, as it
      ;; messes with the tree hierarchy.
      (combobulate-ztree-list-zip (if (car tree) tree (cadr tree))))))