aboutsummaryrefslogtreecommitdiff
path: root/sixel.h
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2020-06-29 20:01:02 +0000
committerDaniel Eklöf <daniel@ekloef.se>2020-06-29 20:01:02 +0000
commit62be729c45ade3759ab0084808bbea491ca5c587 (patch)
tree576727d7367c0f23327e684d67b3c0f6a40f19d8 /sixel.h
parentreflow: ensure sixels are correctly sorted when re-inserted (diff)
scroll: destroy scrolled out sixels before scroll is applied
The logic that breaks out of sixel loops does not work for rows that has already wrapped around. Thus, we need to destroy sixels that are about to be scrolled out *before* we actually scroll. Since this is the *only* time we destroy sixels (instead of overwriting it), rename the sixel functions. And, since they now do a very specific thing, they can be greatly simplified (and thus faster).
Diffstat (limited to 'sixel.h')
-rw-r--r--sixel.h11
1 files changed, 2 insertions, 9 deletions
diff --git a/sixel.h b/sixel.h
index 07e15196..3154e27d 100644
--- a/sixel.h
+++ b/sixel.h
@@ -12,15 +12,8 @@ void sixel_unhook(struct terminal *term);
void sixel_destroy(struct sixel *sixel);
-/*
- * Deletes all sixels that are touched by the specified row(s). Used
- * when scrolling, to competely remove sixels that has either
- * completely, or partly scrolled out of history.
- *
- * Row numbers are relative to the current grid offset.
- */
-void sixel_delete_in_range(struct terminal *term, int row_start, int row_end);
-void sixel_delete_at_row(struct terminal *term, int row);
+void sixel_scroll_up(struct terminal *term, int rows);
+void sixel_scroll_down(struct terminal *term, int rows);
/*
* Remove sixel data from the specified location. Used when printing