GNU bug report logs - #61529
30.0.50; tree-sitter: weird off-by-one error but only in css-ts-mode(?) with `treesit-node-at'

Previous Next

Package: emacs;

Reported by: Mickey Petersen <mickey <at> masteringemacs.org>

Date: Wed, 15 Feb 2023 08:32:01 UTC

Severity: normal

Found in version 30.0.50

Fixed in version 29.1

Done: Dmitry Gutov <dgutov <at> yandex.ru>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Mickey Petersen <mickey <at> masteringemacs.org>
Cc: 61529 <at> debbugs.gnu.org
Subject: bug#61529: 30.0.50; tree-sitter: weird off-by-one error but only in css-ts-mode(?) with `treesit-node-at'
Date: Wed, 15 Feb 2023 15:42:03 +0200
> From: Mickey Petersen <mickey <at> masteringemacs.org>
> Date: Wed, 15 Feb 2023 08:25:53 +0000
> 
> 
> With point at '2', then I'd expect `treesit-node-at' to yield that node. But it does not:
> 
> (cons (point) (treesit-node-at (point)))
> 
> => (34 . #<treesit-node "(" in 34-35>)

The value of point is the number of the character which _follows_
point, yes?  So when the cursor is on '2', point is actually between
'(' and '2'.  Right?  What does this mean in terms of the node that
should be returned by tree-sitter?




This bug report was last modified 2 years and 150 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.