aboutsummaryrefslogtreecommitdiff
path: root/test/functional/treesitter/select_spec.lua
Commit message (Collapse)AuthorAge
* fix(editor)!: operator target/cgn modifies Visual marks #42119Justin M. Keyes2026-09-27
| | | | | | | | | | | | | | | | | | Problem: An operator on a target that creates a Visual selection (`cgn`, `d<C-v>j`, an omap text object like `:<C-U>normal! viw`) sets `'< '>`, `gv` and `visualmode()` to the operator target. This causes at least the following problems: - clobbers the user's previous `'< '>` (annoying and usually unwanted) - E.g. after a custom textobj, `:help text-object-define`. - "cgn" with a `\%V` pattern can't be dot-repeated (".") Solution: Don't save the Visual area if the operator target created it (operator was pending). Also fix `an`/`in` with `'selection'=exclusive` starting from an empty range.
* test(harness): migrate away from magic globalsJustin M. Keyes2026-07-21
| | | | | | | | | | | | | | | | | | | | | Problem: The magic globals `it`, `describe`, etc., are more trouble than they are worth. - Hooking into `after_each` requires `getfenv()` hacks. - They confuse luals/emmylua, because the top-level `.luarc.json` isn't merged with `test/.luarc.json` (apparently a luals limitation?) - They totally defeat discoverability because the user just has to "know" about the various magic symbols. So they harm DX, which means they serve no purpose at all. Solution: - Expose the test API from `testutil`, so tests can call `t.it()`, `t.describe()`, etc., in the conventional way. - Drop `getfenv()` hacks. - Drop the `setfenv()` injection in `load_chunk`. - Drop `test/_meta.lua`.
* refactor(test): use public enum in select_spec #39665Nathan Zeng2026-05-08
| | | | | Problem: select_spec tests a public function, but uses private enums. Solution: Replace private enums with public enums.
* fix(treesitter): drop select() kwargs #39646Justin M. Keyes2026-05-07
| | | | | | | Problem: Unnecessary kwargs. Solution: Use param instead of kwargs.
* feat(treesitter): provide select() #39069Nathan Zeng2026-05-06
| | | | | Problem: No public method for treesitter incremental selection. Solution: Add `vim.treesitter.select()`.
* feat(treesitter): expand selection to sibling node #38938altermo2026-04-22
| | | | | | | | | Problem: Can't expand treesitter-incremental-selection to the next and previous sibling nodes. Solution: Pressing `]N` in visual mode will expand the selection to the next sibling node, and `[N` will do the same with the previous node.
* fix(treesitter): TSNode:id() with NUL byte causes unreliable select() #39134altermo2026-04-16
| | | | | | | | | | | Problem: `TSNode:id()` returns the underlying c pointer as a string, which may include NUL bytes. In PUC Lua, `('%s'):format('\0a\0')` returns `''` and not `'\0a\0'` (i.e. treats the string as a c-string (which terminates at the NUL byte)). This resulted in two different nodes being able to have the same id. Solution: Use concatenation `..` instead of `string.format()`.
* fix(treesitter): select with node ending with unicode char (#38557)altermo2026-03-31
| | | Co-authored-by: zeertzjq <zeertzjq@outlook.com>
* test(treesitter): skip unreliable select test #38391altermo2026-03-20
| | | The test sometimes(around 1/30) fails on PUC-lua.
* docs: api, messages, lsp, trustJustin M. Keyes2026-03-11
| | | | | gen_vimdoc.lua: In prepare for the upcoming release, comment-out the "Experimental" warning for prerelease features.
* feat(treesitter): incremental selectionaltermo2026-03-08
Co-authored-by: György Andorka <gyorgy.andorka@protonmail.com>