summaryrefslogtreecommitdiff
path: root/src/regexp.c
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.c
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.c')
-rw-r--r--src/regexp.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/regexp.c b/src/regexp.c
index 74ed13f3f..af8b375b6 100644
--- a/src/regexp.c
+++ b/src/regexp.c
@@ -1123,10 +1123,12 @@ static unsigned reg_tofreelen;
typedef struct {
regmatch_T *reg_match;
regmmatch_T *reg_mmatch;
+
char_u **reg_startp;
char_u **reg_endp;
lpos_T *reg_startpos;
lpos_T *reg_endpos;
+
win_T *reg_win;
buf_T *reg_buf;
linenr_T reg_firstlnum;