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

fix: iterate over all nodes (#85) #87

Merged
merged 2 commits into from
Sep 10, 2024
Merged

fix: iterate over all nodes (#85) #87

merged 2 commits into from
Sep 10, 2024

Conversation

b0o
Copy link
Contributor

@b0o b0o commented Sep 7, 2024

Query:iter_matches returns a TSNode[] iterator, but it was previously being treated a single TSNode. See :h Query:iter_matches().

Note: I haven't tested this change in earlier nvim versions to see if it's backwards-compatible.

fixes #85

Related: neovim/neovim#30193

Copy link
Owner

@theHamsta theHamsta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

`Query:iter_matches` returns a TSNode[] iterator, but it was previously
being treated a single TSNode.

fixes theHamsta#85
@theHamsta theHamsta enabled auto-merge (rebase) September 10, 2024 08:23
@theHamsta theHamsta merged commit 3497eb3 into theHamsta:master Sep 10, 2024
2 checks passed
theHamsta added a commit that referenced this pull request Sep 28, 2024
After #87, this plugin became incompatible with nvim versions <= 0.9 by
using the newly table parameter of iter_matches. This PR tries to avoid
the parameter and tries to account that iter_matches might return either
nodes or tables of nodes by coercing non-table values to singleton
tables.

Fixes #88
theHamsta added a commit that referenced this pull request Oct 4, 2024
After #87, this plugin became incompatible with nvim versions <= 0.9 by
using the newly table parameter of iter_matches. This PR tries to avoid
the parameter and tries to account that iter_matches might return either
nodes or tables of nodes by coercing non-table values to singleton
tables.

Fixes #88
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

Successfully merging this pull request may close these issues.

Plugin throws a nil value error
2 participants