mirror of
https://github.com/vim/vim.git
synced 2025-09-24 03:44:06 -04:00
patch 8.2.0260: several lines of code are duplicated
Problem: Several lines of code are duplicated. Solution: Move duplicated code to a function. (Yegappan Lakshmanan, closes #5330)
This commit is contained in:
22
src/regexp.c
22
src/regexp.c
@@ -2511,6 +2511,28 @@ reg_submatch_list(int no)
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Initialize the values used for matching against multiple lines
|
||||
*/
|
||||
static void
|
||||
init_regexec_multi(
|
||||
regmmatch_T *rmp,
|
||||
win_T *win, // window in which to search or NULL
|
||||
buf_T *buf, // buffer in which to search
|
||||
linenr_T lnum) // nr of line to start looking for match
|
||||
{
|
||||
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;
|
||||
}
|
||||
|
||||
#include "regexp_bt.c"
|
||||
|
||||
static regengine_T bt_regengine =
|
||||
|
Reference in New Issue
Block a user