render/grid: move grid reflow code to grid.c

This commit is contained in:
Daniel Eklöf 2020-02-15 22:19:08 +01:00
parent 304f8d6982
commit 38a682f0d0
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
3 changed files with 158 additions and 184 deletions

3
grid.h
View file

@ -6,6 +6,9 @@
void grid_swap_row(struct grid *grid, int row_a, int row_b, bool initialize);
struct row *grid_row_alloc(int cols, bool initialize);
void grid_row_free(struct row *row);
int grid_reflow(
struct grid *grid, int new_rows, int new_cols,
int old_screen_rows, int new_screen_rows);
static inline int
grid_row_absolute(const struct grid *grid, int row_no)