mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-05 04:06:08 -05:00
grid: row_add_uri_range: ensure the URIs are sorted
This commit is contained in:
parent
32dc373f1c
commit
7272a5469e
1 changed files with 7 additions and 1 deletions
8
grid.c
8
grid.c
|
|
@ -774,5 +774,11 @@ void
|
|||
grid_row_add_uri_range(struct row *row, struct row_uri_range range)
|
||||
{
|
||||
ensure_row_has_extra_data(row);
|
||||
tll_push_back(row->extra->uri_ranges, range);
|
||||
tll_rforeach(row->extra->uri_ranges, it) {
|
||||
if (it->item.end < range.start) {
|
||||
tll_insert_after(row->extra->uri_ranges, it, range);
|
||||
return;
|
||||
}
|
||||
}
|
||||
tll_push_front(row->extra->uri_ranges, range);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue