nvim-treesitter / nvim-treesitter-textobjects

Apache License 2.0
2.2k stars 200 forks source link

fix(shared) better inner parameter selection #702

Open przepompownia opened 1 month ago

przepompownia commented 1 month ago

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

przepompownia commented 1 month ago

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.