mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-02 11:36:54 -04:00
* fix(utils): swap_nodes calculates correct char_delta The char_delta is not calculated correctly right now when there are two treesitter nodes being swapped, one directly following the other. This is rare but can happen for example when attempting to swap "print" and "(1)" in "print(1)". In this case an incorrect char_delta is calculated because of a bug in range comparison. * test(swap_nodes): check cursor * add a regression test (for multiline node swap) * add a test with adjacent swaps that fails when char_delta is not calculated correctly * test(swap_nodes): check text content after swap * test: note language for parser * fix tests * use same not equal for table comparison |
||
|---|---|---|
| .. | ||
| ts_utils_spec.lua | ||