diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2021-03-14 13:19:12 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2021-03-14 13:19:12 +0000 |
| commit | c5c3447ca8a71ab3cfd84a2b5fd2c193ef5b4fb4 (patch) | |
| tree | b7855c389ad7cac0901bec6a4599767e4e6a8f15 | |
| parent | Merge branch 'sixel-fix-max-geometry' (diff) | |
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().
| -rw-r--r-- | sixel.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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); } |
