Volodymyr Chernetskyi
2f5df7add7
fix(treesitter): #has-parent? errors on a node with no parent
...
Problem:
The #has-parent? predicate indexes the result of node:parent() without
checking it, so a capture that matches a tree's root node raises
query.lua:600: attempt to index a nil value
instead of simply not matching. In a highlights query that breaks
highlighting for the whole buffer. The sibling #has-ancestor? predicate
handles the same situation.
Solution:
Treat a missing parent as "does not match".
AI-assisted
2026-09-06 18:27:02 +02:00
..
2026-09-04 14:28:22 -04:00
2025-05-06 05:15:31 -07:00
2026-09-03 12:44:30 -04:00
2026-09-03 19:17:25 +01:00
2026-03-13 20:32:01 +01:00
2026-08-13 09:17:16 -04:00
2026-08-09 00:49:20 +00:00
2026-03-13 20:32:01 +01:00
2026-09-02 16:04:32 -04:00
2026-09-02 17:01:32 -04:00
2026-09-03 06:40:58 -04:00
2026-09-02 16:58:26 -04:00
2026-06-02 18:17:03 +08:00
2026-09-02 08:12:07 -04:00
2026-09-06 18:27:02 +02:00
2026-07-17 07:09:04 -04:00
2025-12-16 13:22:05 -05:00
2026-07-31 21:50:04 +02:00
2026-04-30 07:26:40 -04:00
2026-07-15 05:55:51 -04:00
2026-09-03 19:17:25 +01:00
2026-05-20 14:09:20 +02:00
2026-09-03 19:17:25 +01:00
2026-08-04 05:19:54 -04:00
2026-05-06 11:13:15 -04:00
2026-09-03 04:10:05 -04:00
2026-08-16 13:29:34 -04:00
2026-02-12 07:15:20 -05:00
2026-01-12 10:58:01 -08:00
2026-07-29 09:03:53 -04:00
2026-09-02 07:45:52 -04:00
2026-01-09 10:07:15 +01:00
2026-09-03 03:23:45 -04:00
2026-09-02 16:27:20 -04:00
2026-09-02 10:08:37 -04:00
2026-07-08 20:15:42 +00:00
2026-08-18 05:16:16 -04:00
2026-05-05 16:26:59 -04:00
2026-08-25 13:32:25 +02:00
2026-08-23 07:13:41 -04:00
2024-02-03 16:53:41 +01:00
2026-08-23 07:13:41 -04:00
2025-02-10 03:04:01 -08:00
2026-09-02 10:09:20 -04:00
2026-08-30 08:32:55 -04:00
2026-07-26 06:24:39 -04:00
2026-08-01 17:48:32 -04:00
2026-06-24 10:40:36 -04:00
2026-09-03 12:44:30 -04:00
2026-04-30 07:12:35 -04:00
2026-09-02 10:10:18 -04:00