mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-04 04:06:06 -05:00
sixel: regression: linefeed count for chunked up sixel image
All image chunks but the last *should* scroll the screen content.
This commit is contained in:
parent
1eb90b2405
commit
5d576fccba
1 changed files with 6 additions and 1 deletions
7
sixel.c
7
sixel.c
|
|
@ -1049,7 +1049,12 @@ sixel_unhook(struct terminal *term)
|
|||
|
||||
if (do_scroll) {
|
||||
/* Yes, truncate last row. This matches XTerm’s, and VT382’s behavior */
|
||||
const int linefeed_count = (image.height - 6 * term->sixel.pan + 1) / term->cell_height;
|
||||
const int linefeed_count = rows_avail == 0
|
||||
? (image.height - 6 * term->sixel.pan + 1) / term->cell_height
|
||||
: image.height / term->cell_height;
|
||||
|
||||
xassert(rows_avail == 0 || image.height % term->cell_height == 0);
|
||||
|
||||
for (size_t i = 0; i < linefeed_count; i++)
|
||||
term_linefeed(term);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue