diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2020-10-05 16:32:44 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2020-10-09 05:44:18 +0000 |
| commit | 2c952761f2b113bf2c3f45abfe8119f243f38f88 (patch) | |
| tree | 460a9c413e2dd041095fab423cf0bf50d9a00b7f | |
| parent | sixel: overwrite: use pixman to calculate new the sixel boundaries (diff) | |
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.
| -rw-r--r-- | sixel.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -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; |
