tweaks: if there is no end match, there is nothing to paint
When there is no end match after a start, it is pointless to look for any more starts because also they will not have any end match, so nothing will get painted -- just cut the loop short.master
parent
c0aa5ad258
commit
a898fa5dcc
|
@ -2504,9 +2504,10 @@ void edit_draw(filestruct *fileptr, const char *converted,
|
||||||
1, &endmatch, 0) == REG_NOMATCH)
|
1, &endmatch, 0) == REG_NOMATCH)
|
||||||
end_line = end_line->next;
|
end_line = end_line->next;
|
||||||
|
|
||||||
/* If no end was found, or it is too early, next step. */
|
/* If there is no end, there is nothing to paint. */
|
||||||
if (end_line == NULL)
|
if (end_line == NULL)
|
||||||
goto step_two;
|
goto tail_of_loop;
|
||||||
|
/* If the end is scrolled off to the left, next step. */
|
||||||
if (end_line == fileptr && endmatch.rm_eo <= from_x) {
|
if (end_line == fileptr && endmatch.rm_eo <= from_x) {
|
||||||
fileptr->multidata[varnish->id] = CBEGINBEFORE;
|
fileptr->multidata[varnish->id] = CBEGINBEFORE;
|
||||||
goto step_two;
|
goto step_two;
|
||||||
|
|
Loading…
Reference in New Issue