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)
diff --git a/src/vim9compile.c b/src/vim9compile.c
index 3eae641..80f918d 100644
--- a/src/vim9compile.c
+++ b/src/vim9compile.c
@@ -7048,7 +7048,7 @@
// 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 @@
{
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;