aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2020-10-04 17:10:54 +0000
committerDaniel Eklöf <daniel@ekloef.se>2020-10-09 05:44:17 +0000
commite870a0068f1967c98f5044890b5f9c0683f240dd (patch)
tree1731dba413a0ce23838829b8945fcab2926f5298
parentsixel: overwrite-by-rectangle: assert sixels don’t cross scrollback wrap-around (diff)
sixel: verify-list-order: add an ‘index’ variable
This will make it easier when debugging assertions in this function.
-rw-r--r--sixel.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sixel.c b/sixel.c
index 8c95e70b..07b16031 100644
--- a/sixel.c
+++ b/sixel.c
@@ -117,6 +117,9 @@ verify_list_order(const struct terminal *term)
int prev_col = -1;
int prev_col_count = 0;
+ /* To aid debugging */
+ size_t idx = 0;
+
tll_foreach(term->grid->sixel_images, it) {
int row = rebase_row(term, it->item.pos.row + it->item.rows - 1);
int col = it->item.pos.col;
@@ -141,6 +144,7 @@ verify_list_order(const struct terminal *term)
prev_row = row;
prev_col = col;
prev_col_count = col_count;
+ idx++;
}
#endif
return true;