patch 9.1.1072: 'diffopt' "linematch" cannot be used with {n} less than 10
Problem: 'diffopt' "linematch" cannot be used with {n} less than 10
digits (after v9.1.1022)
Solution: Fix off-by-one error when checking for digit (zeertzjq)
closes: #16577
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/src/diff.c b/src/diff.c
index 41d61b1..d743334 100644
--- a/src/diff.c
+++ b/src/diff.c
@@ -2795,7 +2795,7 @@
else
return FAIL;
}
- else if (STRNCMP(p, "linematch:", 10) == 0 && VIM_ISDIGIT(p[11]))
+ else if (STRNCMP(p, "linematch:", 10) == 0 && VIM_ISDIGIT(p[10]))
{
p += 10;
linematch_lines_new = getdigits(&p);