Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rubbish values from Node.source after editing tree #25

Open
xcb-xwii opened this issue Sep 4, 2023 · 1 comment
Open

Rubbish values from Node.source after editing tree #25

xcb-xwii opened this issue Sep 4, 2023 · 1 comment

Comments

@xcb-xwii
Copy link
Contributor

xcb-xwii commented Sep 4, 2023

After editing a certain range of the tree using Tree.edit / Tree.edit_s, some calls to Node.source will return rubbish values.

This seems to only apply to nodes that were not affected by the edit. Nodes that did experience changes will return their source text correctly, while unaffected nodes return what I can only assume is junk.

@xcb-xwii
Copy link
Contributor Author

xcb-xwii commented Sep 4, 2023

Read through the code and found this line:
https://github.com/euclidianAce/ltreesitter/blob/0c63020d861b6a3cfa5ff9a756a512b3efc533a3/include/ltreesitter/types.h#L31C1-L31C1

The lack of support for a reader function might be the cause instead. The testing during which I encountered this uses a reader function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant