diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2020-02-22 10:37:25 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2020-02-22 10:37:25 +0000 |
| commit | a418521ced195562c00b49a7676d9396eaf8189f (patch) | |
| tree | 919d4d373ff5e60197d4913364894fe7432ee6f1 | |
| parent | sixel: clean up state machine (diff) | |
sixel: mention why we add one
| -rw-r--r-- | sixel.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -309,8 +309,10 @@ decgci(struct terminal *term, uint8_t c) int nparams = term->sixel.param_idx; - if (nparams > 0) + if (nparams > 0) { + /* Add one, as we use idx==0 for background color (TODO) */ term->sixel.color_idx = min(1 + term->sixel.params[0], COLOR_COUNT - 1); + } if (nparams > 4) { unsigned format = term->sixel.params[1]; |
