mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-05 04:06:08 -05:00
sixel: unhook: do overwrite *after* linefeeding
This ensures the overwrite is done when the scrollback history is in the same state as when we then insert the new image.
This commit is contained in:
parent
0e4b0fefc1
commit
d54adc5263
1 changed files with 5 additions and 2 deletions
7
sixel.c
7
sixel.c
|
|
@ -706,8 +706,8 @@ sixel_unhook(struct terminal *term)
|
|||
.pos = (struct coord){start_col, cur_row},
|
||||
};
|
||||
|
||||
sixel_overwrite_by_rectangle(
|
||||
term, cursor->row, image.pos.col, image.rows, image.cols);
|
||||
assert(image.rows < term->grid->num_rows);
|
||||
assert(image.pos.row + image.rows - 1 < term->grid->num_rows);
|
||||
|
||||
LOG_DBG("generating %dx%d pixman image at %d-%d",
|
||||
image.width, image.height,
|
||||
|
|
@ -723,6 +723,9 @@ sixel_unhook(struct terminal *term)
|
|||
term_linefeed(term);
|
||||
term_carriage_return(term);
|
||||
|
||||
_sixel_overwrite_by_rectangle(
|
||||
term, image.pos.row, image.pos.col, image.rows, image.cols);
|
||||
|
||||
sixel_insert(term, image);
|
||||
|
||||
pixel_row_idx += height;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue