aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/regexp_bt.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/regexp_bt.c')
-rw-r--r--src/nvim/regexp_bt.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/nvim/regexp_bt.c b/src/nvim/regexp_bt.c
index fff5ae9b7f..88f0d781af 100644
--- a/src/nvim/regexp_bt.c
+++ b/src/nvim/regexp_bt.c
@@ -466,7 +466,7 @@ static void regcomp_start(char_u *expr, int re_flags) //
num_complex_braces = 0;
regnpar = 1;
- memset(had_endbrace, 0, sizeof(had_endbrace));
+ CLEAR_FIELD(had_endbrace);
regnzpar = 1;
re_has_z = 0;
regsize = 0L;
@@ -2189,7 +2189,7 @@ collection:
while (*regparse != NUL && *regparse != ']') {
if (*regparse == '-') {
- ++regparse;
+ regparse++;
// The '-' is not used for a range at the end and
// after or before a '\n'.
if (*regparse == ']' || *regparse == NUL
@@ -2619,7 +2619,7 @@ static char_u *regpiece(int *flagp)
regoptail(ret, regnode(BACK));
regoptail(ret, ret);
reginsert_limits(BRACE_LIMITS, minval, maxval, ret);
- ++num_complex_braces;
+ num_complex_braces++;
}
if (minval > 0 && maxval > 0) {
*flagp = (HASWIDTH | (flags & (HASNL | HASLOOKBH)));
@@ -2792,7 +2792,7 @@ static char_u *reg(int paren, int *flagp)
EMSG2_RET_NULL(_("E51: Too many %s("), reg_magic == MAGIC_ALL);
}
parno = regnpar;
- ++regnpar;
+ regnpar++;
ret = regnode(MOPEN + parno);
} else if (paren == REG_NPAREN) {
// Make a NOPEN node.
@@ -3181,7 +3181,7 @@ static int regrepeat(char_u *p, long maxcount)
} else {
break;
}
- ++count;
+ count++;
}
break;
@@ -3299,7 +3299,7 @@ do_class:
} else {
break;
}
- ++count;
+ count++;
}
break;
@@ -3415,7 +3415,7 @@ do_class:
break;
}
scan += len;
- ++count;
+ count++;
}
}
}
@@ -3453,7 +3453,7 @@ do_class:
}
scan++;
}
- ++count;
+ count++;
}
break;
@@ -3764,6 +3764,7 @@ static bool regmatch(char_u *scan, proftime_T *tm, int *timed_out)
case RE_VCOL:
if (!re_num_cmp(win_linetabsize(rex.reg_win == NULL
? curwin : rex.reg_win,
+ rex.reg_firstlnum + rex.lnum,
rex.line,
(colnr_T)(rex.input - rex.line)) + 1,
scan)) {
@@ -4369,7 +4370,7 @@ static bool regmatch(char_u *scan, proftime_T *tm, int *timed_out)
case BRACE_COMPLEX + 8:
case BRACE_COMPLEX + 9:
no = op - BRACE_COMPLEX;
- ++brace_count[no];
+ brace_count[no]++;
// If not matched enough times yet, try one more
if (brace_count[no] <= (brace_min[no] <= brace_max[no]