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:
@@ -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;
|
||||
|
Reference in New Issue
Block a user