@@ -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
67736773nfa_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
69036903nfa_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
71437143nfa_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()
0 commit comments