mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-05 04:06:08 -05:00
term: erase_cell_range: early break out from URI loop
URI ranges are sorted. This means we don’t have to check any more ranges once we’ve seen one that starts *after* the erase range. Closes #594
This commit is contained in:
parent
5caa87adaf
commit
45a04393c4
1 changed files with 6 additions and 0 deletions
|
|
@ -1537,6 +1537,12 @@ erase_cell_range(struct terminal *term, struct row *row, int start, int end)
|
|||
|
||||
/* Split up, or remove, URI ranges affected by the erase */
|
||||
tll_foreach(row->extra->uri_ranges, it) {
|
||||
if (it->item.start > end) {
|
||||
/* This range, and all subsequent ranges, start *after*
|
||||
* the erase range */
|
||||
break;
|
||||
}
|
||||
|
||||
if (it->item.start < start && it->item.end >= start) {
|
||||
/*
|
||||
* URI crosses the erase *start* point.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue