aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/regexp.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/regexp.c')
-rw-r--r--src/nvim/regexp.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/nvim/regexp.c b/src/nvim/regexp.c
index cade4bd1c1..f7e278a4fe 100644
--- a/src/nvim/regexp.c
+++ b/src/nvim/regexp.c
@@ -1141,8 +1141,7 @@ char_u *skip_regexp(char_u *startp, int dirc, int magic, char_u **newp)
/* change "\?" to "?", make a copy first. */
if (*newp == NULL) {
*newp = vim_strsave(startp);
- if (*newp != NULL)
- p = *newp + (p - startp);
+ p = *newp + (p - startp);
}
if (*newp != NULL)
STRMOVE(p, p + 1);