Problem:
Linematch used to use strchr to navigate a string, however strchr does
not supoprt embedded NULs.
Solution:
Use `mmfile_t` instead of `char *` in linematch and introduce `strnchr()`.
Also remove heap allocations from `matching_char_iwhite()`
Fixes: #30505
Specifically, functions that are run in the context of the test runner
are put in module `test/testutil.lua` while the functions that are run
in the context of the test session are put in
`test/functional/testnvim.lua`.
Closes https://github.com/neovim/neovim/issues/27004.
* feat(api): add lua C bindings for xdiff
* chore: opt.hunk_lines -> opt.result_type
opt.on_hunk now takes precedence over opt.result_type
* chore: fix indents
Fix indents
* chore: change how priv is managed
Assign priv NULL and unconditionally apply XFREE_CLEAR to it when
finished.