diff options
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) |