mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-04-26 06:46:45 -04:00
grid: define capacity expansion function
Allocates a new array of rows of the desired capacity and copies all the grid's rows over to it. Assumes the new capacity is greater than the old capacity. In other words, can only be used to expand capacity, not shrink it.
This commit is contained in:
parent
297b5c4734
commit
3818cbd93c
2 changed files with 63 additions and 0 deletions
4
grid.h
4
grid.h
|
|
@ -11,6 +11,10 @@ void grid_swap_row(struct grid *grid, int row_a, int row_b);
|
|||
struct row *grid_row_alloc(int cols, bool initialize);
|
||||
void grid_row_free(struct row *row);
|
||||
|
||||
void grid_expand_capacity(
|
||||
struct grid *grid, int minimum,
|
||||
int scrollback_lines);
|
||||
|
||||
void grid_resize_without_reflow(
|
||||
struct grid *grid, int new_rows, int new_cols,
|
||||
int old_screen_rows, int new_screen_rows);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue