summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/lisp-mnt.el
diff options
context:
space:
mode:
authorYuan Fu <casouri@gmail.com>2023-04-13 14:36:46 -0700
committerEli Zaretskii <eliz@gnu.org>2023-04-14 09:07:46 +0300
commit759cdf1e510d9e0689aefeced784fbb81644cd5e (patch)
tree37650afd6e0fa8819332da1d83fa8cdbbaa86454 /lisp/emacs-lisp/lisp-mnt.el
parent864a4dc236395e441aafd23b9cbca099afdc5324 (diff)
downloademacs-759cdf1e510d9e0689aefeced784fbb81644cd5e.tar.gz
emacs-759cdf1e510d9e0689aefeced784fbb81644cd5e.tar.bz2
emacs-759cdf1e510d9e0689aefeced784fbb81644cd5e.zip
Catch signals produced by PRED in tree-sitter search functions
Earlier we switched to using cursors rather than nodes to traverse the parse tree. Because cursors need cleanup, we have to catch signals thrown by the predicate functions and free the cursor. Failing to do this will result in leaking the cursor whenever the predicate function signals in a search function. This change fixes the leak. * src/treesit.c (treesit_traverse_cleanup_cursor): New function. (Ftreesit_search_subtree) (Ftreesit_search_forward) (Ftreesit_induce_sparse_tree): Catch signals. (Bug#62823) (cherry picked from commit a5eb9f6ad4e6f5a2819b540a477f1e889f6ef355)
Diffstat (limited to 'lisp/emacs-lisp/lisp-mnt.el')
0 files changed, 0 insertions, 0 deletions