sixel: sixel_overwrite_at_cursor(): early exit when the image list is empty

This avoids a call to sixel_overwrite_by_row() (where we also exit
early if the image list is empty).

This saves a couple of instructions to set up the arguments for
sixel_overwrite_by_row().
This commit is contained in:
Daniel Eklöf 2021-03-14 14:19:12 +01:00
parent 2a723e1c4c
commit c5c3447ca8
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

View file

@ -610,6 +610,9 @@ sixel_overwrite_by_row(struct terminal *term, int _row, int col, int width)
void
sixel_overwrite_at_cursor(struct terminal *term, int width)
{
if (likely(tll_length(term->grid->sixel_images) == 0))
return;
sixel_overwrite_by_row(
term, term->grid->cursor.point.row, term->grid->cursor.point.col, width);
}