dualfroz 0f01568dd8 fix: match brackets preceded by an empty node
`find_pair` looked up the node under the cursor with an empty byte
range. When a zero-width node starts at that position, tree-sitter
returns it, and since it is hidden the lookup resolves to its visible
parent instead. Typst emits such a token right before the `(` or `[`
of a call, so on those brackets `mm` either did nothing or jumped to
the closing bracket of an outer pair. `find_matching_bracket` had the
same problem.

Look up the byte under the cursor instead, like the plaintext fallback
at the end of `find_pair` already does.
2026-10-17 03:51:18 +02:00
S
Description
My contributions to helix-editor/helix: 1 commits
33 KiB
0 Stars 1 Watchers 0 Forks
Languages
Rust 100%