aboutsummaryrefslogtreecommitdiff
path: root/terminal.h
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2021-03-07 13:44:16 +0000
committerDaniel Eklöf <daniel@ekloef.se>2021-03-11 16:32:58 +0000
commitc181eb2bf68e2e776cff96b36489de5d45e67fe9 (patch)
treea9bebc18ba72d364bb786b0494430b509403f381 /terminal.h
parentsixel: resize: width is no longer a multiple of 6 (diff)
sixel: empty pixels in the last sixel row doesn’t contribute to the image height
All-empty pixels rows in the last sixel row should not be included in the final sixel image. This allows applications to emit sixels whose height is not a multiple of 6, and is how XTerm works. This is done by tracking the largest row number that contains non-empty pixels. In unhook, when emitting the image, the image height is adjusted based on this value.
Diffstat (limited to 'terminal.h')
-rw-r--r--terminal.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/terminal.h b/terminal.h
index 81893e34..8be5dd74 100644
--- a/terminal.h
+++ b/terminal.h
@@ -521,6 +521,7 @@ struct terminal {
} state;
struct coord pos; /* Current sixel coordinate */
+ int max_non_empty_row_no;
size_t row_byte_ofs; /* Byte position into image, for current row */
int color_idx; /* Current palette index */
uint32_t *private_palette; /* Private palette, used when private mode 1070 is enabled */