aboutsummaryrefslogtreecommitdiff
path: root/sixel.c
diff options
context:
space:
mode:
Diffstat (limited to 'sixel.c')
-rw-r--r--sixel.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sixel.c b/sixel.c
index f9c11037..0600a434 100644
--- a/sixel.c
+++ b/sixel.c
@@ -482,7 +482,8 @@ sixel_unhook(struct terminal *term)
};
sixel_overwrite_by_rectangle(
- term, cursor->row, image.pos.col, image.rows, image.cols);
+ term, cursor->row, image.pos.col,
+ image.rows, min(image.cols, term->cols - image.pos.col));
LOG_DBG("generating %dx%d pixman image at %d-%d",
image.width, image.height,