diff src/regexp_nfa.c @ 28247:f70015784777 v8.2.4649

patch 8.2.4649: various formatting problems Commit: https://github.com/vim/vim/commit/b4ad3b0deac12674a7773311890b48fd39c6807c Author: Bram Moolenaar <Bram@vim.org> Date: Wed Mar 30 10:57:45 2022 +0100 patch 8.2.4649: various formatting problems Problem: Various formatting problems. Solution: Improve the code formatting.
author Bram Moolenaar <Bram@vim.org>
date Wed, 30 Mar 2022 12:00:05 +0200
parents 3ccd55c472b8
children a3a760ee765f
line wrap: on
line diff
--- 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)