diff options
author | dundargoc <gocdundar@gmail.com> | 2023-12-18 10:55:23 +0100 |
---|---|---|
committer | dundargoc <33953936+dundargoc@users.noreply.github.com> | 2023-12-21 17:38:42 +0100 |
commit | af93a74a0f4afa9a3a4f55ffdf28141eaf776d22 (patch) | |
tree | 76068552bf3a74b4170ecd7b087905c96ddd6f8f /src/nvim/regexp.c | |
parent | ade42d531bcc9ca61facfb0524128a8a9f9b2444 (diff) | |
download | rneovim-af93a74a0f4afa9a3a4f55ffdf28141eaf776d22.tar.gz rneovim-af93a74a0f4afa9a3a4f55ffdf28141eaf776d22.tar.bz2 rneovim-af93a74a0f4afa9a3a4f55ffdf28141eaf776d22.zip |
refactor: run IWYU on entire repo
Reference: https://github.com/neovim/neovim/issues/6371.
Diffstat (limited to 'src/nvim/regexp.c')
-rw-r--r-- | src/nvim/regexp.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nvim/regexp.c b/src/nvim/regexp.c index 20c06340be..87f28a4379 100644 --- a/src/nvim/regexp.c +++ b/src/nvim/regexp.c @@ -13,7 +13,7 @@ #include <stdbool.h> #include <stddef.h> #include <string.h> -#include <sys/types.h> +#include <uv.h> #include "nvim/ascii_defs.h" #include "nvim/buffer_defs.h" @@ -6379,7 +6379,7 @@ static bool regmatch(uint8_t *scan, const proftime_T *tm, int *timed_out) case RE_COMPOSING: // Skip composing characters. while (utf_iscomposing(utf_ptr2char((char *)rex.input))) { - MB_CPTR_ADV(rex.input); + rex.input += utf_ptr2len((char *)rex.input); } break; @@ -9840,7 +9840,7 @@ static int nfa_regatom(void) emsg(_(e_nopresub)); return FAIL; } - for (lp = (uint8_t *)reg_prev_sub; *lp != NUL; MB_CPTR_ADV(lp)) { + for (lp = (uint8_t *)reg_prev_sub; *lp != NUL; lp += utf_ptr2len((char *)lp)) { EMIT(utf_ptr2char((char *)lp)); if (lp != (uint8_t *)reg_prev_sub) { EMIT(NFA_CONCAT); |