Add visible range checks to screen_write.c functions and remove checks from tty.c.

This commit is contained in:
Michael Grant
2026-05-24 09:58:30 +01:00
parent 8b474429b7
commit 30866d06d5
2 changed files with 331 additions and 38 deletions

5
tty.c
View File

@@ -1442,8 +1442,6 @@ tty_draw_pane(struct tty *tty, const struct tty_ctx *ctx, u_int py)
*/
r = tty_check_overlay_range(tty, ctx->xoff,
ctx->yoff + py, nx);
r = screen_redraw_get_visible_ranges(wp,
ctx->xoff, ctx->yoff + py, nx, r);
for (i = 0; i < r->used; i++) {
ri = &r->ranges[i];
if (ri->nx == 0) continue;
@@ -2113,8 +2111,7 @@ tty_cmd_cell(struct tty *tty, const struct tty_ctx *ctx)
tty_margin_off(tty);
tty_cursor_pane_unless_wrap(tty, ctx, ctx->ocx, ctx->ocy);
if (screen_redraw_is_visible(r, px))
tty_cell(tty, ctx->cell, &ctx->defaults, ctx->palette,
tty_cell(tty, ctx->cell, &ctx->defaults, ctx->palette,
ctx->s->hyperlinks);
if (ctx->flags & TTY_CTX_CELL_INVALIDATE)