1
0
forked from aniani/vim

patch 9.0.0951: trying every character position for a match is inefficient

Problem:    Trying every character position for a match is inefficient.
Solution:   Use the start position of the match ignoring "\zs".
This commit is contained in:
Bram Moolenaar
2022-11-26 11:47:10 +00:00
parent c96311b5be
commit 01105b37a1
5 changed files with 34 additions and 2 deletions

View File

@@ -133,6 +133,8 @@ typedef struct
regprog_T *regprog;
char_u *startp[NSUBEXP];
char_u *endp[NSUBEXP];
colnr_T rm_matchcol; // match start without "\zs"
int rm_ic;
} regmatch_T;
@@ -149,6 +151,8 @@ typedef struct
regprog_T *regprog;
lpos_T startpos[NSUBEXP];
lpos_T endpos[NSUBEXP];
colnr_T rmm_matchcol; // match start without "\zs"
int rmm_ic;
colnr_T rmm_maxcol; // when not zero: maximum column
} regmmatch_T;