mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-18 05:34:02 -04:00
grid: repair grid_row_in_view(): use 'view', not 'offset'
This commit is contained in:
parent
1ff1b3a71e
commit
132749b1ed
1 changed files with 1 additions and 1 deletions
2
grid.h
2
grid.h
|
|
@ -28,7 +28,7 @@ grid_row_in_view(struct grid *grid, int row_no)
|
||||||
{
|
{
|
||||||
assert(grid->view >= 0);
|
assert(grid->view >= 0);
|
||||||
|
|
||||||
int real_row = (grid->offset + row_no + grid->num_rows) % grid->num_rows;
|
int real_row = (grid->view + row_no + grid->num_rows) % grid->num_rows;
|
||||||
struct row *row = grid->rows[real_row];
|
struct row *row = grid->rows[real_row];
|
||||||
|
|
||||||
assert(row != NULL);
|
assert(row != NULL);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue