Function: treemacs-single-click-expand-action
treemacs-single-click-expand-action is an autoloaded, interactive and
byte-compiled function defined in treemacs-mouse-interface.el.
Signature
(treemacs-single-click-expand-action EVENT)
Documentation
A modified single-leftclick action that expands the clicked nodes.
Can be bound to <mouse1> if you prefer to expand nodes with a single click instead of a double click. Either way it must be bound to a mouse click, or EVENT will not be supplied.
Clicking on icons will expand a file's tags, just like
treemacs-leftclick-action.
Key Bindings
Source Code
;; Defined in ~/.emacs.d/elpa/treemacs-20251226.1307/treemacs-mouse-interface.el
;;;###autoload
(defun treemacs-single-click-expand-action (event)
"A modified single-leftclick action that expands the clicked nodes.
Can be bound to <mouse1> if you prefer to expand nodes with a single click
instead of a double click. Either way it must be bound to a mouse click, or
EVENT will not be supplied.
Clicking on icons will expand a file's tags, just like
`treemacs-leftclick-action'."
(interactive "e")
(when (eq 'mouse-1 (elt event 0))
(select-window (->> event (cadr) (nth 0)))
(goto-char (posn-point (cadr event)))
(when (region-active-p)
(keyboard-quit))
;; 7th element is the clicked image
(if (->> event (cadr) (nth 7))
(treemacs-do-for-button-state
:on-file-node-closed (treemacs--expand-file-node btn)
:on-file-node-open (treemacs--collapse-file-node btn)
:on-tag-node-closed (treemacs--expand-tag-node btn)
:on-tag-node-open (treemacs--collapse-tag-node btn)
:no-error t)
(-when-let (state (treemacs--prop-at-point :state))
(funcall (cdr (assoc state treemacs-doubleclick-actions-config)))))
(treemacs--evade-image)))