diff options
| author | bfredl <bjorn.linse@gmail.com> | 2023-04-19 17:07:33 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-04-19 17:07:33 +0200 |
| commit | 3940c435e4058f75b8ecbfc9f9c3b2a2c4b64f37 (patch) | |
| tree | 3c23ed475376a20f2334f5131ebc5b39f6afe343 /src/nvim/regexp_bt.c | |
| parent | ea52961c54797fc27e305eb4bb11a5d2c4cdda58 (diff) | |
| parent | aee6f08ce12a62e9104892702a658a8d3daee4df (diff) | |
| download | rneovim-3940c435e4058f75b8ecbfc9f9c3b2a2c4b64f37.tar.gz rneovim-3940c435e4058f75b8ecbfc9f9c3b2a2c4b64f37.tar.bz2 rneovim-3940c435e4058f75b8ecbfc9f9c3b2a2c4b64f37.zip | |
Merge pull request #23155 from bfredl/nobreak
fix(runtime): do not allow breakcheck inside runtime path calculation
Diffstat (limited to 'src/nvim/regexp_bt.c')
| -rw-r--r-- | src/nvim/regexp_bt.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/nvim/regexp_bt.c b/src/nvim/regexp_bt.c index af3d93f7c4..a6f554d4ae 100644 --- a/src/nvim/regexp_bt.c +++ b/src/nvim/regexp_bt.c @@ -3539,7 +3539,7 @@ static bool regmatch(uint8_t *scan, proftime_T *tm, int *timed_out) for (;;) { // Some patterns may take a long time to match, e.g., "\([a-z]\+\)\+Q". // Allow interrupting them with CTRL-C. - fast_breakcheck(); + reg_breakcheck(); #ifdef REGEXP_DEBUG if (scan != NULL && regnarrate) { @@ -4792,7 +4792,7 @@ static bool regmatch(uint8_t *scan, proftime_T *tm, int *timed_out) break; } rex.input = rex.line + strlen((char *)rex.line); - fast_breakcheck(); + reg_breakcheck(); } else { MB_PTR_BACK(rex.line, rex.input); } @@ -5155,6 +5155,7 @@ static int bt_regexec_nl(regmatch_T *rmp, uint8_t *line, colnr_T col, bool line_ rex.reg_win = NULL; rex.reg_ic = rmp->rm_ic; rex.reg_icombine = false; + rex.reg_nobreak = rmp->regprog->re_flags & RE_NOBREAK; rex.reg_maxcol = 0; long r = bt_regexec_both(line, col, NULL, NULL); |