grid: add new function grid_row_add_uri_range()

This commit is contained in:
Daniel Eklöf 2021-02-14 20:50:33 +01:00
parent fd505f2274
commit 5eea06cff9
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
2 changed files with 11 additions and 0 deletions

9
grid.c
View file

@ -588,3 +588,12 @@ grid_resize_and_reflow(
tll_free(tracking_points);
}
void
grid_row_add_uri_range(struct row *row, struct row_uri_range range)
{
if (row->extra == NULL)
row->extra = xcalloc(1, sizeof(*row->extra));
tll_push_back(row->extra->uri_ranges, range);
}

2
grid.h
View file

@ -73,6 +73,8 @@ grid_row_in_view(struct grid *grid, int row_no)
return row;
}
void grid_row_add_uri_range(struct row *row, struct row_uri_range range);
static inline void
grid_row_reset_extra(struct row *row)
{