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(shared) better inner parameter selection #702

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

przepompownia
Copy link
Contributor

The logic of including a point in a range needs -1 end_col offset
only if the point is from the cursor position
but not from the end of another range.

Fixes #700

The logic of including a point in a range needs `-1` end_col offset
only if the point is from the cursor position
but not from the end of another range.

Fixes nvim-treesitter#700
@przepompownia przepompownia marked this pull request as draft October 15, 2024 17:04
@przepompownia
Copy link
Contributor Author

przepompownia commented Oct 15, 2024

Examples to cover by test:

vim.print(1, tonumber('1')) -- on `tonumber`
vim.print({1, '2'}, 3) -- on closing brace
vim.print({1, '2'}) -- on closing brace

Currently the change breaks function.outer selection.

@przepompownia przepompownia marked this pull request as ready for review October 15, 2024 18:37
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.

1 participant