diff options
author | Christian Brabandt <cb@256bit.org> | 2024-04-10 16:18:15 +0200 |
---|---|---|
committer | Christian Brabandt <cb@256bit.org> | 2024-04-10 16:22:17 +0200 |
commit | c97f4d61cde24030f2f7d2318e1b409a0ccc3e43 (patch) | |
tree | f656142296f4b44236674cdb6258d96acab0a6ee /src/regexp_nfa.c | |
parent | 49f1e1979f9c3a4d7b28f0961bca0e41227a0557 (diff) |
patch 9.1.0297: Patch 9.1.0296 causes too many issuesv9.1.0297
Problem: Patch 9.1.0296 causes too many issues
(Tony Mechelynck, @chdiza, CI)
Solution: Back out the change for now
Revert "patch 9.1.0296: regexp: engines do not handle case-folding well"
This reverts commit 7a27c108e0509f3255ebdcb6558e896c223e4d23 it causes
issues with syntax highlighting and breaks the FreeBSD and MacOS CI. It
needs more work.
fixes: #14487
Signed-off-by: Christian Brabandt <cb@256bit.org>
Diffstat (limited to 'src/regexp_nfa.c')
-rw-r--r-- | src/regexp_nfa.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/regexp_nfa.c b/src/regexp_nfa.c index 451720a09d..5e4fadd028 100644 --- a/src/regexp_nfa.c +++ b/src/regexp_nfa.c @@ -5666,12 +5666,7 @@ find_match_text(colnr_T *startcol, int regstart, char_u *match_text) for (;;) { match = TRUE; - // skip regstart - len2 = MB_CHAR2LEN(regstart); - if (enc_utf8 && len2 > 1 && MB_CHAR2LEN(PTR2CHAR(rex.line + col)) != len2) - // because of case-folding of the previously matched text, we may need - // to skip fewer bytes than mb_char2len(regstart) - len2 = mb_char2len(utf_fold(regstart)); + len2 = MB_CHAR2LEN(regstart); // skip regstart for (len1 = 0; match_text[len1] != NUL; len1 += MB_CHAR2LEN(c1)) { c1 = PTR2CHAR(match_text + len1); @@ -7508,7 +7503,7 @@ nfa_regexec_both( // If match_text is set it contains the full text that must match. // Nothing else to try. Doesn't handle combining chars well. - if (prog->match_text != NULL && *prog->match_text != NUL && !rex.reg_icombine) + if (prog->match_text != NULL && !rex.reg_icombine) { retval = find_match_text(&col, prog->regstart, prog->match_text); if (REG_MULTI) |