summaryrefslogtreecommitdiffstats
path: root/src/regexp.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/regexp.c')
-rw-r--r--src/regexp.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/regexp.c b/src/regexp.c
index d431932191..147452aae2 100644
--- a/src/regexp.c
+++ b/src/regexp.c
@@ -620,6 +620,7 @@ skip_regexp_ex(
{
magic_T mymagic;
char_u *p = startp;
+ size_t startplen = STRLEN(startp);
if (magic)
mymagic = MAGIC_ON;
@@ -642,12 +643,9 @@ skip_regexp_ex(
{
if (dirc == '?' && newp != NULL && p[1] == '?')
{
- size_t startplen = 0;
-
// change "\?" to "?", make a copy first.
if (*newp == NULL)
{
- startplen = STRLEN(startp);
*newp = vim_strnsave(startp, startplen);
if (*newp != NULL)
p = *newp + (p - startp);