aboutsummaryrefslogtreecommitdiff
path: root/sixel.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2020-10-03 20:42:03 +0000
committerDaniel Eklöf <daniel@ekloef.se>2020-10-11 17:25:22 +0000
commite694f293ac982b751accbe2d218596cf17ba711e (patch)
treec5f7f000cb637aa921b4fa506c8fafef67e7c813 /sixel.c
parentterm: re-calculate sixel images’ rows/cols values when cell size changes (diff)
sixel: overwrite: remove asserts
Sixels may extend outside the visible screen area
Diffstat (limited to 'sixel.c')
-rw-r--r--sixel.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/sixel.c b/sixel.c
index 747e3d00..84a3ec96 100644
--- a/sixel.c
+++ b/sixel.c
@@ -211,11 +211,6 @@ static void
sixel_overwrite(struct terminal *term, struct sixel *six,
int row, int col, int height, int width)
{
- assert(row >= 0);
- assert(row + height <= term->grid->num_rows);
- assert(col >= 0);
- assert(col + width <= term->grid->num_cols);
-
int rel_above = min(max(row - six->pos.row, 0), six->rows);
int rel_below = max(min(row + height - six->pos.row, six->rows), 0);
int rel_left = min(max(col - six->pos.col, 0), six->cols);
@@ -315,11 +310,6 @@ static void
_sixel_overwrite_by_rectangle(
struct terminal *term, int row, int col, int height, int width)
{
- assert(row >= 0);
- assert(row + height <= term->grid->num_rows);
- assert(col >= 0);
- assert(col + width <= term->grid->num_cols);
-
const int start = row;
const int end = row + height - 1;
@@ -492,8 +482,7 @@ sixel_unhook(struct terminal *term)
};
sixel_overwrite_by_rectangle(
- term, cursor->row, image.pos.col,
- image.rows, min(image.cols, term->cols - image.pos.col));
+ term, cursor->row, image.pos.col, image.rows, image.cols);
LOG_DBG("generating %dx%d pixman image at %d-%d",
image.width, image.height,