Skip to content

Commit 82d2f72

Browse files
committed
updated for version 7.4.527
Problem: Still confusing regexp failure and NFA_TOO_EXPENSIVE. Solution: NFA changes equivalent of 7.4.526.
1 parent 3c05b5f commit 82d2f72

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

src/regexp_nfa.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6767,7 +6767,7 @@ nfa_regmatch(prog, start, submatch, m)
67676767

67686768
/*
67696769
* Try match of "prog" with at regline["col"].
6770-
* Returns 0 for failure, number of lines contained in the match otherwise.
6770+
* Returns <= 0 for failure, number of lines contained in the match otherwise.
67716771
*/
67726772
static long
67736773
nfa_regtry(prog, col)
@@ -6897,7 +6897,7 @@ nfa_regtry(prog, col)
68976897
* Match a regexp against a string ("line" points to the string) or multiple
68986898
* lines ("line" is NULL, use reg_getline()).
68996899
*
6900-
* Returns 0 for failure, number of lines contained in the match otherwise.
6900+
* Returns <= 0 for failure, number of lines contained in the match otherwise.
69016901
*/
69026902
static long
69036903
nfa_regexec_both(line, startcol)
@@ -7137,7 +7137,7 @@ nfa_regfree(prog)
71377137
* Uses curbuf for line count and 'iskeyword'.
71387138
* If "line_lbr" is TRUE consider a "\n" in "line" to be a line break.
71397139
*
7140-
* Return TRUE if there is a match, FALSE if not.
7140+
* Returns <= 0 for failure, number of lines contained in the match otherwise.
71417141
*/
71427142
static int
71437143
nfa_regexec_nl(rmp, line, col, line_lbr)
@@ -7157,7 +7157,7 @@ nfa_regexec_nl(rmp, line, col, line_lbr)
71577157
ireg_icombine = FALSE;
71587158
#endif
71597159
ireg_maxcol = 0;
7160-
return (nfa_regexec_both(line, col) != 0);
7160+
return nfa_regexec_both(line, col);
71617161
}
71627162

71637163

@@ -7166,7 +7166,7 @@ nfa_regexec_nl(rmp, line, col, line_lbr)
71667166
* "rmp->regprog" is a compiled regexp as returned by vim_regcomp().
71677167
* Uses curbuf for line count and 'iskeyword'.
71687168
*
7169-
* Return zero if there is no match. Return number of lines contained in the
7169+
* Return <= 0 if there is no match. Return number of lines contained in the
71707170
* match otherwise.
71717171
*
71727172
* Note: the body is the same as bt_regexec() except for nfa_regexec_both()

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -741,6 +741,8 @@ static char *(features[]) =
741741

742742
static int included_patches[] =
743743
{ /* Add new patch number below this line */
744+
/**/
745+
527,
744746
/**/
745747
526,
746748
/**/

0 commit comments

Comments
 (0)