summaryrefslogtreecommitdiff
path: root/src/regexp_nfa.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-02-15 23:06:45 +0100
committerBram Moolenaar <Bram@vim.org>2020-02-15 23:06:45 +0100
commitf4140488c72cad4dbf5449dba099cfa7de7bbb22 (patch)
treeef69c7720d31e0871cd01c41d447a5440e9d8e9c /src/regexp_nfa.c
parentebdf3c964a901fc00c9009689f7cfda478342c51 (diff)
downloadvim-git-f4140488c72cad4dbf5449dba099cfa7de7bbb22.tar.gz
patch 8.2.0260: several lines of code are duplicatedv8.2.0260
Problem: Several lines of code are duplicated. Solution: Move duplicated code to a function. (Yegappan Lakshmanan, closes #5330)
Diffstat (limited to 'src/regexp_nfa.c')
-rw-r--r--src/regexp_nfa.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/src/regexp_nfa.c b/src/regexp_nfa.c
index a288ea47c..67d4af2f6 100644
--- a/src/regexp_nfa.c
+++ b/src/regexp_nfa.c
@@ -7409,17 +7409,7 @@ nfa_regexec_multi(
proftime_T *tm, // timeout limit or NULL
int *timed_out) // flag set on timeout or NULL
{
- rex.reg_match = NULL;
- rex.reg_mmatch = rmp;
- rex.reg_buf = buf;
- rex.reg_win = win;
- rex.reg_firstlnum = lnum;
- rex.reg_maxline = rex.reg_buf->b_ml.ml_line_count - lnum;
- rex.reg_line_lbr = FALSE;
- rex.reg_ic = rmp->rmm_ic;
- rex.reg_icombine = FALSE;
- rex.reg_maxcol = rmp->rmm_maxcol;
-
+ init_regexec_multi(rmp, win, buf, lnum);
return nfa_regexec_both(NULL, col, tm, timed_out);
}