aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/regexp.c
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2019-04-24 11:23:32 +0200
committerGitHub <noreply@github.com>2019-04-24 11:23:32 +0200
commit24a9516ff41b69e649f0dac131ad20efbe19eb4b (patch)
tree3703fe68b2381407524033959e3e7721d7a7dbdc /src/nvim/regexp.c
parent8c6f5b7f9268087bce8c136e81c1631a8f87abbe (diff)
parent37c7c964aef5f0d47c0bd0fb8abb15a5407e4b27 (diff)
downloadrneovim-24a9516ff41b69e649f0dac131ad20efbe19eb4b.tar.gz
rneovim-24a9516ff41b69e649f0dac131ad20efbe19eb4b.tar.bz2
rneovim-24a9516ff41b69e649f0dac131ad20efbe19eb4b.zip
Merge #9906 from janlazo/vim-8.0.0647
vim-patch:8.0.{647,768,797,1085,1092,1107,1133,1408}
Diffstat (limited to 'src/nvim/regexp.c')
-rw-r--r--src/nvim/regexp.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/nvim/regexp.c b/src/nvim/regexp.c
index c602e7df0f..39ce7ff844 100644
--- a/src/nvim/regexp.c
+++ b/src/nvim/regexp.c
@@ -5098,8 +5098,6 @@ static int regmatch(
printf("Premature EOL\n");
#endif
}
- if (status == RA_FAIL)
- got_int = TRUE;
return status == RA_MATCH;
}
@@ -7226,7 +7224,8 @@ static void report_re_switch(char_u *pat)
/// @param nl
///
/// @return TRUE if there is a match, FALSE if not.
-static int vim_regexec_both(regmatch_T *rmp, char_u *line, colnr_T col, bool nl)
+static int vim_regexec_string(regmatch_T *rmp, char_u *line, colnr_T col,
+ bool nl)
{
regexec_T rex_save;
bool rex_in_use_save = rex_in_use;
@@ -7275,8 +7274,8 @@ static int vim_regexec_both(regmatch_T *rmp, char_u *line, colnr_T col, bool nl)
int vim_regexec_prog(regprog_T **prog, bool ignore_case, char_u *line,
colnr_T col)
{
- regmatch_T regmatch = {.regprog = *prog, .rm_ic = ignore_case};
- int r = vim_regexec_both(&regmatch, line, col, false);
+ regmatch_T regmatch = { .regprog = *prog, .rm_ic = ignore_case };
+ int r = vim_regexec_string(&regmatch, line, col, false);
*prog = regmatch.regprog;
return r;
}
@@ -7285,7 +7284,7 @@ int vim_regexec_prog(regprog_T **prog, bool ignore_case, char_u *line,
// Return TRUE if there is a match, FALSE if not.
int vim_regexec(regmatch_T *rmp, char_u *line, colnr_T col)
{
- return vim_regexec_both(rmp, line, col, false);
+ return vim_regexec_string(rmp, line, col, false);
}
// Like vim_regexec(), but consider a "\n" in "line" to be a line break.
@@ -7293,7 +7292,7 @@ int vim_regexec(regmatch_T *rmp, char_u *line, colnr_T col)
// Return TRUE if there is a match, FALSE if not.
int vim_regexec_nl(regmatch_T *rmp, char_u *line, colnr_T col)
{
- return vim_regexec_both(rmp, line, col, true);
+ return vim_regexec_string(rmp, line, col, true);
}
/// Match a regexp against multiple lines.