commit 0d85a798e5c8d376af7de28038ec3b847aac5bdf
parent d4d534925f7e963440f72c3baf52ee9fac4b4cf0
Author: Benno Schulenberg <bensberg@telfort.nl>
Date: Mon, 21 Feb 2022 10:42:29 +0100
painting: look for another start match only after the actual end match
The 'endmatch.rm_eo' value is relative to the end of the start match,
so to find the end of the end match, one has to add 'startmatch.rm_eo'
plus 'endmatch.rm_eo' to the starting point of the line.
This addresses https://savannah.gnu.org/bugs/?62091.
Problem existed since version 5.6, commit 0596b875.
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/color.c b/src/color.c
@@ -259,8 +259,8 @@ void check_the_multis(linestruct *line)
if (!astart && !anend)
continue;
} else if (line->multidata[ink->id] == JUSTONTHIS) {
- if (astart && anend && regexec(ink->start, line->data + endmatch.rm_eo,
- 1, &startmatch, 0) != 0)
+ if (astart && anend && regexec(ink->start, line->data + startmatch.rm_eo +
+ endmatch.rm_eo, 1, &startmatch, 0) != 0)
continue;
} else if (line->multidata[ink->id] == STARTSHERE) {
if (astart && !anend)