commit 2358badc65419cd7f8834b3bdbd03193234d906a
parent efdb543f8c6e2a36d207b88fd8aefc4cf1dc2a52
Author: Benno Schulenberg <bensberg@justemail.net>
Date: Tue, 14 Feb 2017 16:56:43 +0100
painting: properly detect a change in start/end matches
The inversion of the logic in commit a6605dce was incomplete -- oops.
This fixes https://savannah.gnu.org/bugs/?50306.
Diffstat:
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/color.c b/src/color.c
@@ -295,7 +295,7 @@ void color_update(void)
void check_the_multis(filestruct *line)
{
const colortype *ink;
- int astart, anend;
+ bool astart, anend;
regmatch_t startmatch, endmatch;
/* If there is no syntax or no multiline regex, there is nothing to do. */
@@ -309,8 +309,8 @@ void check_the_multis(filestruct *line)
alloc_multidata_if_needed(line);
- astart = regexec(ink->start, line->data, 1, &startmatch, 0);
- anend = regexec(ink->end, line->data, 1, &endmatch, 0);
+ astart = (regexec(ink->start, line->data, 1, &startmatch, 0) == 0);
+ anend = (regexec(ink->end, line->data, 1, &endmatch, 0) == 0);
/* Check whether the multidata still matches the current situation. */
if (line->multidata[ink->id] == CNONE ||