color: push the resets further when start and end match are equal
When for a multiline syntax-coloring rule the starting regex matches at the exact same spot as the ending regex, do a second round of resets, so that reevaluation starts further back and gets a few more things right. This mildly fixes https://savannah.gnu.org/bugs/?47420.master
parent
528b79b5f3
commit
4af1da7d95
|
@ -376,6 +376,11 @@ void reset_multis(filestruct *fileptr, bool force)
|
||||||
|
|
||||||
/* If we got here, things have changed. */
|
/* If we got here, things have changed. */
|
||||||
reset_multis_for_id(fileptr, tmpcolor->id);
|
reset_multis_for_id(fileptr, tmpcolor->id);
|
||||||
|
|
||||||
|
/* If start and end are the same, push the resets further. */
|
||||||
|
if (force == FALSE && !nobegin && !noend &&
|
||||||
|
startmatch.rm_so == endmatch.rm_so)
|
||||||
|
reset_multis_for_id(fileptr, tmpcolor->id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue