Function: treesit--explorer-jump
treesit--explorer-jump is an interactive and byte-compiled function
defined in treesit.el.gz.
Signature
(treesit--explorer-jump BUTTON)
Documentation
Mark the original text corresponding to BUTTON.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/treesit.el.gz
(defun treesit--explorer-jump (button)
"Mark the original text corresponding to BUTTON."
(interactive)
(when (and (derived-mode-p 'treesit--explorer-tree-mode)
(buffer-live-p treesit--explorer-source-buffer))
(with-current-buffer treesit--explorer-source-buffer
(let ((start (button-get button 'node-start))
(end (button-get button 'node-end)))
(when treesit--explorer-highlight-overlay
(delete-overlay treesit--explorer-highlight-overlay))
(setq-local treesit--explorer-highlight-overlay
(make-overlay start end nil t nil))
(overlay-put treesit--explorer-highlight-overlay
'face 'highlight)))))