mirror of
git://git.sv.gnu.org/nano.git
synced 2025-01-24 02:02:45 +03:00
painting: tighten the check for a lacking end match on a colored line
As it's possible for the start regex to match what is actually the end match of a multiline thing (see the Python triple quotes, for example), make sure that such a detected start match is *not* an end match, just to avoid a needless full-screen refresh.
This commit is contained in:
parent
5c3e00d70a
commit
18ba7f60c1
@ -262,7 +262,9 @@ void check_the_multis(linestruct *line)
|
||||
if (!astart)
|
||||
continue;
|
||||
} else if (line->multidata[ink->id] & (WHOLELINE|WOULDBE)) {
|
||||
if (!astart && !anend)
|
||||
/* Ensure that a detected start match is not actually an end match. */
|
||||
if (!anend && (!astart || regexec(ink->end, line->data, 1,
|
||||
&endmatch, 0) != 0))
|
||||
continue;
|
||||
} else if (line->multidata[ink->id] == JUSTONTHIS) {
|
||||
if (astart && anend && regexec(ink->start, line->data + startmatch.rm_eo +
|
||||
|
Loading…
Reference in New Issue
Block a user