]> git.eshelyaron.com Git - emacs.git/commit
Fix treesit-node-first-child-for-pos (bug#60127)
authorYuan Fu <casouri@gmail.com>
Tue, 17 Jan 2023 08:57:54 +0000 (00:57 -0800)
committerYuan Fu <casouri@gmail.com>
Tue, 17 Jan 2023 09:18:16 +0000 (01:18 -0800)
commit7c61a304104fe3a35c47d412150d29b93a697c5e
tree1296bb007bf5d3ed5a6364f2fe0d8d6f6353c6b2
parentb36cc7e7bbb5a8d0c1b298b89a4cb562af746ecc
Fix treesit-node-first-child-for-pos (bug#60127)

The problem is due to a bug in ts_node_first_child_for_pos, but
tree-sitter is moving pretty slowly right now so I reimplemented a
correct version of it in treesit.c.

* src/treesit.c (treesit_cursor_first_child_for_byte): New function.
(Ftreesit_node_first_child_for_pos): Use the new function.
src/treesit.c