Use the y offset from the context which has already been adjusted for

the status line, also make tty_clamp_line adjust the y position.
This commit is contained in:
Nicholas Marriott
2018-08-20 19:34:04 +01:00
parent 1e8c9fb490
commit 31508228bc
2 changed files with 28 additions and 28 deletions

View File

@ -94,7 +94,7 @@ void
screen_write_start(struct screen_write_ctx *ctx, struct window_pane *wp,
struct screen *s)
{
char tmp[16];
char tmp[32];
u_int y;
memset(ctx, 0, sizeof *ctx);
@ -113,8 +113,10 @@ screen_write_start(struct screen_write_ctx *ctx, struct window_pane *wp,
ctx->scrolled = 0;
ctx->bg = 8;
if (wp != NULL)
snprintf(tmp, sizeof tmp, "pane %%%u", wp->id);
if (wp != NULL) {
snprintf(tmp, sizeof tmp, "pane %%%u (at %u,%u)", wp->id,
wp->xoff, wp->yoff);
}
log_debug("%s: size %ux%u, %s", __func__, screen_size_x(ctx->s),
screen_size_y(ctx->s), wp == NULL ? "no pane" : tmp);
}