diff options
| -rw-r--r-- | sixel.c | 6 | ||||
| -rw-r--r-- | terminal.h | 1 |
2 files changed, 4 insertions, 3 deletions
@@ -1272,8 +1272,6 @@ sixel_add(struct terminal *term, int col, int width, uint32_t color, uint8_t six static void sixel_add_many(struct terminal *term, uint8_t c, unsigned count) { - uint32_t color = term->sixel.palette[term->sixel.color_idx]; - int col = term->sixel.pos.col; int width = term->sixel.image.width; @@ -1283,6 +1281,7 @@ sixel_add_many(struct terminal *term, uint8_t c, unsigned count) return; } + uint32_t color = term->sixel.color; for (unsigned i = 0; i < count; i++, col++) sixel_add(term, col, width, color, c); @@ -1509,7 +1508,8 @@ decgci(struct terminal *term, uint8_t c) break; } } - } + } else + term->sixel.color = term->sixel.palette[term->sixel.color_idx]; term->sixel.state = SIXEL_DECSIXEL; sixel_put(term, c); @@ -560,6 +560,7 @@ struct terminal { uint32_t *private_palette; /* Private palette, used when private mode 1070 is enabled */ uint32_t *shared_palette; /* Shared palette, used when private mode 1070 is disabled */ uint32_t *palette; /* Points to either private_palette or shared_palette */ + uint32_t color; struct { uint32_t *data; /* Raw image data, in ARGB */ |
