Commit 4af1da7d authored by Benno Schulenberg's avatar Benno Schulenberg
Browse files

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.
No related merge requests found
Showing with 5 additions and 0 deletions
+5 -0
......@@ -376,6 +376,11 @@ void reset_multis(filestruct *fileptr, bool force)
/* If we got here, things have changed. */
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);
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment