summaryrefslogtreecommitdiff
path: root/src/regexp.h
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-11-26 11:47:10 +0000
committerBram Moolenaar <Bram@vim.org>2022-11-26 11:47:10 +0000
commit01105b37a108022515d364201767f7f111ec4222 (patch)
tree352f98cdf0ccf56a8854b00df62a00573edb9780 /src/regexp.h
parentc96311b5be307f5a1d1b20a0ec930d63964e7335 (diff)
downloadvim-git-01105b37a108022515d364201767f7f111ec4222.tar.gz
patch 9.0.0951: trying every character position for a match is inefficientv9.0.0951
Problem: Trying every character position for a match is inefficient. Solution: Use the start position of the match ignoring "\zs".
Diffstat (limited to 'src/regexp.h')
-rw-r--r--src/regexp.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/regexp.h b/src/regexp.h
index 89c41c957..d6c8f48c7 100644
--- a/src/regexp.h
+++ b/src/regexp.h
@@ -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;