mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-04 04:06:06 -05:00
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:
parent
2a723e1c4c
commit
c5c3447ca8
1 changed files with 3 additions and 0 deletions
3
sixel.c
3
sixel.c
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue