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".
diff --git a/src/regexp.h b/src/regexp.h
index 89c41c9..d6c8f48 100644
--- a/src/regexp.h
+++ b/src/regexp.h
@@ -133,6 +133,8 @@
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 @@
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;