From: Yuan Fu Date: Sat, 24 Aug 2024 22:25:48 +0000 (-0700) Subject: Fix Ftreesit_parser_create X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=914cee5a8661ec30b246cf21002f09f7f050e0ec;p=emacs.git Fix Ftreesit_parser_create * src/treesit.c (Ftreesit_parser_create): We recently changed something such that base buffer and indirect buffer appears to use separate parser-lists. Therefore, creating a parser in one of the buffer shouldn't reuse the parser in another buffer. (cherry picked from commit f322905f6a31deb8da7f3d40a87e5ea097df5a73) --- diff --git a/src/treesit.c b/src/treesit.c index a41892b1cac..218cb7407a8 100644 --- a/src/treesit.c +++ b/src/treesit.c @@ -1467,7 +1467,8 @@ an indirect buffer. */) { struct Lisp_TS_Parser *parser = XTS_PARSER (XCAR (tail)); if (EQ (parser->tag, tag) - && EQ (parser->language_symbol, language)) + && EQ (parser->language_symbol, language) + && EQ (parser->buffer, buf_orig)) return XCAR (tail); } }