mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-06 01:40:22 -05:00
sixel: current geometry: don’t exceed current window dimensions
This is similar to what XTerm does, and fixes an issue with lsix, where the output did not wrap.
This commit is contained in:
parent
72eed46a11
commit
acb3f1cd10
2 changed files with 4 additions and 1 deletions
3
sixel.c
3
sixel.c
|
|
@ -1145,7 +1145,8 @@ sixel_geometry_report_current(struct terminal *term)
|
|||
{
|
||||
char reply[64];
|
||||
snprintf(reply, sizeof(reply), "\033[?2;0;%u;%uS",
|
||||
term->sixel.max_width, term->sixel.max_height);
|
||||
min(term->cols * term->cell_width, term->sixel.max_width),
|
||||
min(term->rows * term->cell_height, term->sixel.max_height));
|
||||
term_to_slave(term, reply, strlen(reply));
|
||||
|
||||
LOG_DBG("query response for current sixel geometry: %ux%u",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue