From a8e2a24f60c304d071ba16dd103ec2a8741ffa82 Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Fri, 29 Jan 2021 10:58:09 +0100 Subject: [PATCH] tweaks: frob a condition, to be more concise, and reshuffle another --- src/color.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/color.c b/src/color.c index fa9cc99b..4b016af1 100644 --- a/src/color.c +++ b/src/color.c @@ -261,19 +261,18 @@ void check_the_multis(linestruct *line) anend = (regexec(ink->end, afterstart, 1, &endmatch, 0) == 0); /* Check whether the multidata still matches the current situation. */ - if (line->multidata[ink->id] == NOTHING || - line->multidata[ink->id] == WHOLELINE) { + if (line->multidata[ink->id] & (NOTHING|WHOLELINE)) { if (!astart && !anend) continue; } else if (line->multidata[ink->id] == JUSTONTHIS) { if (astart && anend && startmatch.rm_so < endmatch.rm_so) continue; - } else if (line->multidata[ink->id] == ENDSHERE) { - if (!astart && anend) - continue; } else if (line->multidata[ink->id] == STARTSHERE) { if (astart && !anend) continue; + } else if (line->multidata[ink->id] == ENDSHERE) { + if (!astart && anend) + continue; } /* There is a mismatch, so something changed: repaint. */