summaryrefslogtreecommitdiffstats
path: root/src/regexp_nfa.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/regexp_nfa.c')
-rw-r--r--src/regexp_nfa.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/regexp_nfa.c b/src/regexp_nfa.c
index 4d95f83f1b..503895eede 100644
--- a/src/regexp_nfa.c
+++ b/src/regexp_nfa.c
@@ -6764,8 +6764,10 @@ nfa_regmatch(
case NFA_MARK_GT:
case NFA_MARK_LT:
{
- size_t col = rex.input - rex.line;
- pos_T *pos = getmark_buf(rex.reg_buf, t->state->val, FALSE);
+ pos_T *pos;
+ size_t col = REG_MULTI ? rex.input - rex.line : 0;
+
+ pos = getmark_buf(rex.reg_buf, t->state->val, FALSE);
// Line may have been freed, get it again.
if (REG_MULTI)