altermo
bb2284d75e
fix(treesitter): TSNode:id() with NUL byte causes unreliable select() #39134
...
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()`.
2026-04-16 13:52:20 -04:00
..
2026-04-16 09:35:58 -04:00
2025-05-06 05:15:31 -07:00
2026-04-16 09:35:58 -04:00
2026-03-13 20:32:01 +01:00
2026-04-15 18:45:26 +00:00
2026-04-16 10:28:01 +08:00
2026-03-13 20:32:01 +01:00
2026-04-15 18:45:26 +00:00
2026-04-16 09:35:58 -04:00
2025-08-17 20:40:28 -07:00
2026-04-10 11:36:04 -04:00
2026-04-12 15:01:32 -04:00
2026-04-16 13:52:20 -04:00
2026-03-12 11:12:56 +01:00
2025-12-16 13:22:05 -05:00
2026-03-13 15:57:36 -04:00
2025-12-30 01:44:52 -05:00
2025-08-23 12:01:38 -07:00
2026-03-11 18:24:57 +01:00
2026-02-23 17:33:13 -05:00
2026-04-15 18:45:26 +00:00
2025-06-06 15:36:48 +01:00
2026-04-11 08:05:43 +08:00
2026-03-28 09:59:54 -04:00
2026-02-12 07:15:20 -05:00
2026-01-12 10:58:01 -08:00
2026-03-28 09:22:22 -04:00
2025-08-28 11:34:01 +02:00
2026-01-09 10:07:15 +01:00
2026-03-11 18:00:18 +01:00
2026-03-23 08:00:53 -04:00
2026-03-12 11:04:05 -04:00
2026-04-15 10:27:44 -04:00
2026-04-12 14:17:50 +02:00
2026-04-16 10:33:20 -04:00
2026-04-16 16:50:36 +08:00
2024-02-03 16:53:41 +01:00
2026-04-16 16:50:36 +08:00
2025-02-10 03:04:01 -08:00
2026-03-11 18:00:18 +01:00
2026-04-15 18:45:26 +00:00
2025-07-12 20:54:22 -07:00
2026-03-13 15:57:36 -04:00
2026-03-23 10:14:48 -04:00
2026-04-01 17:04:41 -04:00
2026-03-13 20:32:01 +01:00
2026-04-08 13:33:00 -04:00