diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2020-06-28 06:37:25 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2020-06-28 06:37:25 +0000 |
| commit | 247e0c42d38ee79c36fc2104c9e93666a29b1b12 (patch) | |
| tree | d7ecb5076a332bdb17aacaf5543fc6b4db1b8262 | |
| parent | grid: reflow: delete sixels that end up crossing the scrollback wrap around (diff) | |
sixel: add local function sixel_insert()
Replace all tll_push_*() calls with calls to this function.
| -rw-r--r-- | sixel.c | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -87,6 +87,12 @@ sixel_erase(struct terminal *term, struct sixel *sixel) sixel_destroy(sixel); } +static void +sixel_insert(struct terminal *term, struct sixel sixel) +{ + tll_push_back(term->grid->sixel_images, sixel); +} + /* Row numbers are absolute */ static void sixel_delete_at_point(struct terminal *term, int row, int col) @@ -284,7 +290,7 @@ sixel_overwrite(struct terminal *term, struct sixel *six, PIXMAN_a8r8g8b8, imgs[i].width, imgs[i].height, imgs[i].data, imgs[i].width * sizeof(uint32_t)); - tll_push_front(term->grid->sixel_images, imgs[i]); + sixel_insert(term, imgs[i]); } } @@ -464,7 +470,7 @@ sixel_unhook(struct terminal *term) term_formfeed(term); render_refresh(term); - tll_push_back(term->grid->sixel_images, image); + sixel_insert(term, image); pixel_row_idx += height; pixel_rows_left -= height; |
