Rename the visible ranges functions since they really relate to windows

and put them nto a new file.
This commit is contained in:
nicm
2026-06-16 10:47:35 +00:00
parent 4b772fd783
commit 9ad75e1dc3
7 changed files with 251 additions and 229 deletions

View File

@@ -65,8 +65,7 @@ cmd_display_panes_put(struct screen_redraw_ctx *ctx,
struct visible_range *ri;
u_int i, j;
r = screen_redraw_get_visible_ranges(wp, ctx->ox + cx, ctx->oy + cy,
len, NULL);
r = window_visible_ranges(wp, ctx->ox + cx, ctx->oy + cy, len, NULL);
for (i = 0; i < r->used; i++) {
ri = &r->ranges[i];
for (j = ri->px; j < ri->px + ri->nx; j++) {
@@ -103,7 +102,7 @@ cmd_display_panes_draw_format(struct screen_redraw_ctx *ctx,
screen_write_stop(&sctx);
free(expanded);
r = screen_redraw_get_visible_ranges(wp, px, wp->yoff, sx, NULL);
r = window_visible_ranges(wp, px, wp->yoff, sx, NULL);
for (i = 0; i < r->used; i++) {
ri = &r->ranges[i];
tty_draw_line(tty, &screen, ri->px - px, 0, ri->nx,