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.
master
parent
efdb543f8c
commit
2358badc65
|
@ -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 ||
|
||||
|
|
Loading…
Reference in New Issue