aboutsummaryrefslogtreecommitdiff
path: root/grid.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2020-06-27 13:34:54 +0000
committerDaniel Eklöf <daniel@ekloef.se>2020-06-27 13:34:54 +0000
commit644c8ef879cfae9666cce87f83936a38dad1d34d (patch)
tree38561f687c77b6565d8d47a515624cfa84b2f1f4 /grid.c
parentsixel: improve descriptions of sixel_delete_* and sixel_overwrite_* (diff)
grid: add TODO, and an assert, that sixels must not cross wrap-around
Diffstat (limited to 'grid.c')
-rw-r--r--grid.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/grid.c b/grid.c
index 1347c863..ee10f38b 100644
--- a/grid.c
+++ b/grid.c
@@ -123,6 +123,10 @@ grid_reflow(struct grid *grid, int new_rows, int new_cols,
struct sixel six = it->item;
six.pos.row = new_row_idx;
+ /* TODO: ensure sixels don't span across the wrap-around */
+ int end __attribute__((unused)) = (six.pos.row + six.rows - 1) & (new_rows - 1);
+ assert(end >= six.pos.row);
+
tll_push_back(new_sixels, six);
tll_remove(grid->sixel_images, it);
}