From 2358badc65419cd7f8834b3bdbd03193234d906a Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Tue, 14 Feb 2017 16:56:43 +0100 Subject: [PATCH] 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. --- src/color.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/color.c b/src/color.c index 81799d1b..5b688991 100644 --- 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 ||