diff options
author | Bram Moolenaar <Bram@vim.org> | 2021-01-04 12:42:13 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-01-04 12:42:13 +0100 |
commit | d93a7fc1a98a58f8101ee780d4735079ad99ae35 (patch) | |
tree | 15445b4ab17588d6786645d1ff1235dfd4bb9fb6 /src/ex_cmds.c | |
parent | 82c38fe508155c11a904e6111b5bfb6adde3fb9a (diff) |
patch 8.2.2295: incsearch does not detect empty pattern properlyv8.2.2295
Problem: Incsearch does not detect empty pattern properly.
Solution: Return magic state when skipping over a pattern. (Christian
Brabandt, closes #7612, closes #6420)
Diffstat (limited to 'src/ex_cmds.c')
-rw-r--r-- | src/ex_cmds.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ex_cmds.c b/src/ex_cmds.c index 734949c336..c61810fe6c 100644 --- a/src/ex_cmds.c +++ b/src/ex_cmds.c @@ -3672,7 +3672,7 @@ ex_substitute(exarg_T *eap) delimiter = *cmd++; // remember delimiter character pat = cmd; // remember start of search pat cmd = skip_regexp_ex(cmd, delimiter, magic_isset(), - &eap->arg, NULL); + &eap->arg, NULL, NULL); if (cmd[0] == delimiter) // end delimiter found *cmd++ = NUL; // replace it with a NUL } @@ -4856,7 +4856,7 @@ ex_global(exarg_T *eap) if (delim) ++cmd; // skip delimiter if there is one pat = cmd; // remember start of pattern - cmd = skip_regexp_ex(cmd, delim, magic_isset(), &eap->arg, NULL); + cmd = skip_regexp_ex(cmd, delim, magic_isset(), &eap->arg, NULL, NULL); if (cmd[0] == delim) // end delimiter found *cmd++ = NUL; // replace it with a NUL } |