grid: add grid_row_uri_range_erase()

This function handles erasing of an URI range. That is, a range of the
row is being either erased, or overwritten (from the URI perspective,
these two are the same thing).

We handle both partial overwrites (split up, or truncate URI), as well
as complete overwrites (remove URI).
This commit is contained in:
Daniel Eklöf 2021-11-20 13:42:07 +01:00
parent 7522c2d211
commit 1a0de0017f
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
3 changed files with 155 additions and 78 deletions

3
grid.h
View file

@ -74,7 +74,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);
void grid_row_uri_range_add(struct row *row, struct row_uri_range range);
void grid_row_uri_range_erase(struct row *row, int start, int end);
static inline void
grid_row_uri_range_destroy(struct row_uri_range *range)