aboutsummaryrefslogtreecommitdiff
path: root/grid.h
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2019-07-10 14:35:52 +0000
committerDaniel Eklöf <daniel@ekloef.se>2019-07-10 14:35:52 +0000
commit132749b1ed51ccf540fee42483bbdbb883c3fee8 (patch)
tree53a58cd4460a928f18397f1ed8531b79ead9fa71 /grid.h
parentgrid: don't pre-allocate the entire grid (with all scrollback lines) (diff)
grid: repair grid_row_in_view(): use 'view', not 'offset'
Diffstat (limited to 'grid.h')
-rw-r--r--grid.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/grid.h b/grid.h
index 47b68839..5d87f495 100644
--- a/grid.h
+++ b/grid.h
@@ -28,7 +28,7 @@ grid_row_in_view(struct grid *grid, int row_no)
{
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];
assert(row != NULL);