diff options
author | Bram Moolenaar <Bram@vim.org> | 2022-11-26 11:47:10 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-11-26 11:47:10 +0000 |
commit | 01105b37a108022515d364201767f7f111ec4222 (patch) | |
tree | 352f98cdf0ccf56a8854b00df62a00573edb9780 /src/regexp.c | |
parent | c96311b5be307f5a1d1b20a0ec930d63964e7335 (diff) | |
download | vim-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.c | 2 |
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; |