mirror of
https://github.com/tmux/tmux.git
synced 2026-10-08 10:54:28 +00:00
Clean up image support and add regression tests
This commit is contained in:
7
grid.c
7
grid.c
@@ -739,7 +739,7 @@ grid_clear(struct grid *gd, u_int px, u_int py, u_int nx, u_int ny, u_int bg)
|
||||
if (nx == 0 || ny == 0)
|
||||
return;
|
||||
#ifdef ENABLE_IMAGES
|
||||
image_grid_damage(gd, px, py, nx, ny);
|
||||
image_grid_remove_sixel_spans(gd, px, py, nx, ny);
|
||||
#endif
|
||||
|
||||
if (px == 0 && nx == gd->sx) {
|
||||
@@ -793,7 +793,9 @@ grid_clear_lines(struct grid *gd, u_int py, u_int ny, u_int bg)
|
||||
for (yy = py; yy < py + ny; yy++) {
|
||||
gl = &gd->linedata[yy];
|
||||
#ifdef ENABLE_IMAGES
|
||||
image_grid_damage(gd, 0, yy, gd->sx, 1);
|
||||
/* Remove any SIXEL spans invalidated by clearing this line. */
|
||||
image_grid_remove_sixel_spans(gd, 0, yy, gd->sx, 1);
|
||||
/* Preserve the remaining Kitty spans. */
|
||||
images = gl->images;
|
||||
#endif
|
||||
free(gl->celldata);
|
||||
@@ -1242,6 +1244,7 @@ grid_string_cells(struct grid *gd, u_int px, u_int py, u_int nx,
|
||||
grid_get_cell(gd, xx, py, &gc);
|
||||
if (gc.flags & GRID_FLAG_PADDING)
|
||||
continue;
|
||||
|
||||
if (lastgc != NULL && (flags & GRID_STRING_WITH_SEQUENCES)) {
|
||||
grid_string_cells_code(*lastgc, &gc, code, sizeof code,
|
||||
flags, s, &has_link);
|
||||
|
||||
Reference in New Issue
Block a user