mirror of
https://github.com/neovim/neovim.git
synced 2025-09-30 15:08:35 +00:00
fix(diff): use mmfile_t in linematch
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
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
#include <stddef.h> // IWYU pragma: keep
|
||||
|
||||
#include "nvim/pos_defs.h" // IWYU pragma: keep
|
||||
#include "xdiff/xdiff.h"
|
||||
|
||||
#ifdef INCLUDE_GENERATED_DECLARATIONS
|
||||
# include "linematch.h.generated.h"
|
||||
|
Reference in New Issue
Block a user