mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-24 01:40:12 -05:00
grid: reflow: caller may now pass a list of coordinates that should be translated
This commit is contained in:
parent
e5521ff79a
commit
ef52ed8a10
3 changed files with 11 additions and 4 deletions
7
grid.c
7
grid.c
|
|
@ -55,7 +55,9 @@ grid_row_free(struct row *row)
|
|||
|
||||
void
|
||||
grid_reflow(struct grid *grid, int new_rows, int new_cols,
|
||||
int old_screen_rows, int new_screen_rows)
|
||||
int old_screen_rows, int new_screen_rows,
|
||||
size_t tracking_points_count,
|
||||
struct coord *_tracking_points[static tracking_points_count])
|
||||
{
|
||||
struct row *const *old_grid = grid->rows;
|
||||
const int old_rows = grid->num_rows;
|
||||
|
|
@ -90,6 +92,9 @@ grid_reflow(struct grid *grid, int new_rows, int new_cols,
|
|||
tll_push_back(tracking_points, &cursor);
|
||||
tll_push_back(tracking_points, &saved_cursor);
|
||||
|
||||
for (size_t i = 0; i < tracking_points_count; i++)
|
||||
tll_push_back(tracking_points, _tracking_points[i]);
|
||||
|
||||
/*
|
||||
* Walk the old grid
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue