aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Walch <florian@fwalch.com>2014-12-24 14:19:43 +0100
committerFlorian Walch <florian@fwalch.com>2014-12-24 14:23:07 +0100
commitfe0801d51d08941ea609d513e320f85be50ed8d9 (patch)
tree8c5db1fde889787f8cd2fd9c37faaa0462bb8e36
parent59985523b851fe61b62afcef69f4564f064cbc0a (diff)
downloadrneovim-fe0801d51d08941ea609d513e320f85be50ed8d9.tar.gz
rneovim-fe0801d51d08941ea609d513e320f85be50ed8d9.tar.bz2
rneovim-fe0801d51d08941ea609d513e320f85be50ed8d9.zip
vim-patch:7.4.527
Problem: Still confusing regexp failure and NFA_TOO_EXPENSIVE. Solution: NFA changes equivalent of 7.4.526. https://code.google.com/p/vim/source/detail?r=v7-4-527
-rw-r--r--src/nvim/regexp_nfa.c10
-rw-r--r--src/nvim/version.c2
2 files changed, 6 insertions, 6 deletions
diff --git a/src/nvim/regexp_nfa.c b/src/nvim/regexp_nfa.c
index 2bf73ce72b..fc3e73c396 100644
--- a/src/nvim/regexp_nfa.c
+++ b/src/nvim/regexp_nfa.c
@@ -6011,7 +6011,7 @@ nextchar:
/*
* Try match of "prog" with at regline["col"].
- * Returns 0 for failure, number of lines contained in the match otherwise.
+ * Returns <= 0 for failure, number of lines contained in the match otherwise.
*/
static long nfa_regtry(nfa_regprog_T *prog, colnr_T col)
{
@@ -6116,7 +6116,7 @@ static long nfa_regtry(nfa_regprog_T *prog, colnr_T col)
* Match a regexp against a string ("line" points to the string) or multiple
* lines ("line" is NULL, use reg_getline()).
*
- * Returns 0 for failure, number of lines contained in the match otherwise.
+ * Returns <= 0 for failure, number of lines contained in the match otherwise.
*/
static long
nfa_regexec_both (
@@ -6346,7 +6346,7 @@ static void nfa_regfree(regprog_T *prog)
* Uses curbuf for line count and 'iskeyword'.
* If "line_lbr" is true, consider a "\n" in "line" to be a line break.
*
- * Return TRUE if there is a match, FALSE if not.
+ * Returns <= 0 for failure, number of lines contained in the match otherwise.
*/
static int
nfa_regexec_nl (
@@ -6365,7 +6365,7 @@ nfa_regexec_nl (
ireg_ic = rmp->rm_ic;
ireg_icombine = FALSE;
ireg_maxcol = 0;
- return nfa_regexec_both(line, col) != 0;
+ return nfa_regexec_both(line, col);
}
/// Matches a regexp against multiple lines.
@@ -6378,7 +6378,7 @@ nfa_regexec_nl (
/// @param col Column to start looking for match
/// @param tm Timeout limit or NULL
///
-/// @return Zero if there is no match and number of lines contained in the match
+/// @return <= 0 if there is no match and number of lines contained in the match
/// otherwise.
///
/// @note The body is the same as bt_regexec() except for nfa_regexec_both()
diff --git a/src/nvim/version.c b/src/nvim/version.c
index b469d0e804..3e7450c139 100644
--- a/src/nvim/version.c
+++ b/src/nvim/version.c
@@ -211,7 +211,7 @@ static int included_patches[] = {
//530,
//529,
//528,
- //527,
+ 527,
//526,
//525,
//524,