]> git.eshelyaron.com Git - emacs.git/commit
Fix treesit-beginning/end-of-defun
authorYuan Fu <casouri@gmail.com>
Mon, 24 Oct 2022 01:47:02 +0000 (18:47 -0700)
committerYuan Fu <casouri@gmail.com>
Mon, 24 Oct 2022 01:47:02 +0000 (18:47 -0700)
commitc120b0ebdb20cfff73dd1d43541f1ba1bbc54b74
treeddbe737251d739fa25aa50d2a57078afcd2c9de5
parent6cf2a9c55dbf8dfbc93409340065cf02881502b1
Fix treesit-beginning/end-of-defun

Now they always move to the top-level defun (i.e., skips nested ones).

* lisp/treesit.el (treesit--find-top-level-match): New function
(treesit-beginning-of-defun): Goes to the top-level match.
(treesit-end-of-defun): Simply move to the end of current match.
lisp/treesit.el