Function: treemacs--get-indentation

treemacs--get-indentation is a byte-compiled function defined in treemacs-visuals.el.

Signature

(treemacs--get-indentation DEPTH)

Documentation

Gets an indentation string DEPTH levels deep.

Source Code

;; Defined in ~/.emacs.d/elpa/treemacs-20251226.1307/treemacs-visuals.el
(define-inline treemacs--get-indentation (depth)
  "Gets an indentation string DEPTH levels deep."
  (inline-letevals (depth)
    (inline-quote
     (progn
       (when (or (>= ,depth (length treemacs--indentation-string-cache))
                 (not (eq (car treemacs--indentation-string-cache-key) treemacs-indentation))
                 ;; Eq is faster than string comparison, and accidentally
                 ;; rebuilding the cache in some corner case is not disastrous.
                 (not (eq (cdr treemacs--indentation-string-cache-key) treemacs-indentation-string)))
         (treemacs--build-indentation-cache ,depth))
       (aref treemacs--indentation-string-cache ,depth)))))