0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

patch 8.2.2295: incsearch does not detect empty pattern properly

Problem:    Incsearch does not detect empty pattern properly.
Solution:   Return magic state when skipping over a pattern. (Christian
            Brabandt, closes #7612, closes #6420)
This commit is contained in:
Bram Moolenaar
2021-01-04 12:42:13 +01:00
parent 82c38fe508
commit d93a7fc1a9
15 changed files with 125 additions and 40 deletions

View File

@@ -7048,7 +7048,7 @@ compile_catch(char_u *arg, cctx_T *cctx UNUSED)
// Push v:exception, push {expr} and MATCH
generate_instr_type(cctx, ISN_PUSHEXC, &t_string);
end = skip_regexp_ex(p + 1, *p, TRUE, &tofree, &dropped);
end = skip_regexp_ex(p + 1, *p, TRUE, &tofree, &dropped, NULL);
if (*end != *p)
{
semsg(_(e_separator_mismatch_str), p);
@@ -7372,7 +7372,7 @@ compile_exec(char_u *line, exarg_T *eap, cctx_T *cctx)
{
int delim = *eap->arg;
p = skip_regexp_ex(eap->arg + 1, delim, TRUE, NULL, NULL);
p = skip_regexp_ex(eap->arg + 1, delim, TRUE, NULL, NULL, NULL);
if (*p == delim)
{
eap->arg = p + 1;