Skip to content

Commit

Permalink
Include size parameter in the iterm protocol.
Browse files Browse the repository at this point in the history
Tested with vscode terminal, which tests for it.

Fixes #116
  • Loading branch information
hzeller committed Aug 27, 2023
1 parent 31f22a4 commit 3271ca9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/iterm2-canvas.cc
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,9 @@ void ITerm2GraphicsCanvas::Send(int x, int dy, const Framebuffer &fb_orig,
png_buf.get(), png_buf_size);

char *pos = offset;
pos += sprintf(pos, "\e]1337;File=width=%dpx;height=%dpx;inline=1:",
fb->width(), fb->height());
pos += sprintf(pos,
"\e]1337;File=size=%d;width=%dpx;height=%dpx;inline=1:",
png_size, fb->width(), fb->height());
pos = timg::EncodeBase64(png_buf.get(), png_size, pos);

*pos++ = '\007';
Expand Down

0 comments on commit 3271ca9

Please sign in to comment.