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-11 17:25:50 +0000
commit5a2cc9c9ae744e8b5026e02dfc4c568c4e7ad95c (patch)
tree1097d8e9998d8782760bf0f1d8ba9e5a61e6dd87
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;