Function: treemacs--refresh-dir

treemacs--refresh-dir is a byte-compiled function defined in treemacs-core-utils.el.

Signature

(treemacs--refresh-dir PATH &optional PROJECT)

Documentation

Local refresh for button at PATH and PROJECT.

Simply collapses and re-expands the button (if it has not been closed).

Source Code

;; Defined in ~/.emacs.d/elpa/treemacs-20251226.1307/treemacs-core-utils.el
(define-inline treemacs--refresh-dir (path &optional project)
  "Local refresh for button at PATH and PROJECT.
Simply collapses and re-expands the button (if it has not been closed)."
  (inline-letevals (path project)
    (inline-quote
     (let ((btn (treemacs-goto-file-node ,path ,project)))
       (when (memq (treemacs-button-get btn :state) '(dir-node-open file-node-open root-node-open))
         (goto-char (treemacs-button-start btn))
         (treemacs--push-button btn)
         (goto-char (treemacs-button-start btn))
         (treemacs--push-button btn))))))