mirror of
https://github.com/tmux/tmux.git
synced 2025-09-01 20:57:00 +00:00
Three SIXEL improvements from nincsnevem662 at gmail dot com in GitHub issue
4149: - Pass P2 on the received image through when forwarding the image to the outside terminal to preserve transparency; - Preserve raster attribute dimensions which may be smaller than the actual image (used to crop out parts of the image to work around the limitation that rows must come in groups of six); - To avoid collapsing empty sixel lines, no longer ignore duplicate "-" new line specifiers.
This commit is contained in:
8
input.c
8
input.c
@ -2320,6 +2320,7 @@ input_dcs_dispatch(struct input_ctx *ictx)
|
||||
#ifdef ENABLE_SIXEL
|
||||
struct window *w;
|
||||
struct sixel_image *si;
|
||||
int p2;
|
||||
#endif
|
||||
|
||||
if (wp == NULL)
|
||||
@ -2333,7 +2334,12 @@ input_dcs_dispatch(struct input_ctx *ictx)
|
||||
#ifdef ENABLE_SIXEL
|
||||
w = wp->window;
|
||||
if (buf[0] == 'q') {
|
||||
si = sixel_parse(buf, len, w->xpixel, w->ypixel);
|
||||
if (input_split(ictx) != 0)
|
||||
return (0);
|
||||
p2 = input_get(ictx, 1, 0, 0);
|
||||
if (p2 == -1)
|
||||
p2 = 0;
|
||||
si = sixel_parse(buf, len, p2, w->xpixel, w->ypixel);
|
||||
if (si != NULL)
|
||||
screen_write_sixelimage(sctx, si, ictx->cell.cell.bg);
|
||||
}
|
||||
|
Reference in New Issue
Block a user