[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#71863: 31.0.50; Wrong argument type for treesit-query-range in trees
From: |
Eli Zaretskii |
Subject: |
bug#71863: 31.0.50; Wrong argument type for treesit-query-range in treesit-update-ranges |
Date: |
Sat, 06 Jul 2024 11:38:12 +0300 |
> From: Noah Peart <noah.v.peart@gmail.com>
> Date: Sun, 30 Jun 2024 16:12:06 -0400
>
> I just noticed this after building latest Emacs. In
> `treesit-update-ranges`, during redisplay, the first argument to
> `treesit-query-range` is a tree-sitter language symbol, not a node.
>
> At treesit.el:760
>
> (let* ((host-lang (treesit-query-language query))
> (parser (treesit-parser-create language))
> (old-ranges (treesit-parser-included-ranges parser))
> >>> host-lang isnt a node
> (new-ranges (treesit-query-range
> host-lang query beg end offset))
>
> This causes a an error in modes that have set `treesit-range-settings`
> eg., `js-ts-mode`:
>
> > Error muted by safe_call: (treesit--font-lock-mark-ranges-to-fontify
> > ((1 . 940)) #<treesit-parser for javascript>) signaled
> > (wrong-type-argument treesit-node-p javascript) Error during
> > redisplay: (jit-lock-function 1) signaled (wrong-type-argument
> > treesit-node-p javascript)
>
> And in `syntax-propertize-function`, for example in `ruby-ts-mode`,
>
> > QuitError muted by safe_call: (internal--syntax-propertize 46)
> > signaled (wrong-type-argument treesit-node-p ruby)
Yuan, could you please look into this issue?
- bug#71863: 31.0.50; Wrong argument type for treesit-query-range in treesit-update-ranges,
Eli Zaretskii <=